@Test public void test_should_return_service_definition_for_given_search_criteria() { final ServiceDefinitionSearchCriteria searchCriteria = new ServiceDefinitionSearchCriteria("serviceCode", "tenantId"); final ServiceDefinition expectedServiceDefinition = ServiceDefinition.builder().build(); when(serviceDefinitionRepository.find(searchCriteria)).thenReturn(expectedServiceDefinition); final ServiceDefinition actualServiceDefinition = serviceDefinitionService.find(searchCriteria); assertEquals(expectedServiceDefinition, actualServiceDefinition); }
public ServiceDefinition find(ServiceDefinitionSearchCriteria searchCriteria) { return repository.find(searchCriteria); }
ServiceDefinitionService { public ServiceDefinition find(ServiceDefinitionSearchCriteria searchCriteria) { return repository.find(searchCriteria); } }
ServiceDefinitionService { public ServiceDefinition find(ServiceDefinitionSearchCriteria searchCriteria) { return repository.find(searchCriteria); } ServiceDefinitionService(ServiceDefinitionRepository repository); }
ServiceDefinitionService { public ServiceDefinition find(ServiceDefinitionSearchCriteria searchCriteria) { return repository.find(searchCriteria); } ServiceDefinitionService(ServiceDefinitionRepository repository); ServiceDefinition find(ServiceDefinitionSearchCriteria searchCriteria); ServiceDefinition create(); }
ServiceDefinitionService { public ServiceDefinition find(ServiceDefinitionSearchCriteria searchCriteria) { return repository.find(searchCriteria); } ServiceDefinitionService(ServiceDefinitionRepository repository); ServiceDefinition find(ServiceDefinitionSearchCriteria searchCriteria); ServiceDefinition create();  }