NIKE Interview Question

How to write testable code, why use Dependence Injection.