Protocol-based dependency injection patterns for testable Swift code with Swift Testing framework examples.