Refactoring the tests that use too many mocks