test with a mock for service