Refactoring tests with doubles