Refactoring to Improve Testability: Extracting Dependencies