example of splitting service and testing with mocks