refactor mocks