NIKE interview question

How to write testable code, why use Dependence Injection.