@Test public void test_throwException_Create_WaterSource() { final List<SourceType> waterSourceTypeList = new ArrayList<>(); waterSourceTypeList.add(getWaterSourceType()); final SourceTypeRequest waterSourceRequest = new SourceTypeRequest(); waterSourceRequest.setSourceTypes(waterSourceTypeList); when(waterSourceTypeRepository.create(any(SourceTypeRequest.class))) .thenReturn(waterSourceRequest); assertTrue(waterSourceRequest.equals(waterSourceTypeService.create(waterSourceRequest))); }
public SourceTypeRequest create(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.create(waterSourceRequest); }
SourceTypeService { public SourceTypeRequest create(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.create(waterSourceRequest); } }
SourceTypeService { public SourceTypeRequest create(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.create(waterSourceRequest); }  }
SourceTypeService { public SourceTypeRequest create(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.create(waterSourceRequest); }  SourceTypeRequest create(final SourceTypeRequest waterSourceRequest); SourceTypeRequest update(final SourceTypeRequest waterSourceRequest); List<SourceType> pushCreateToQueue(final String topic, final String key,
            final SourceTypeRequest sourcetypeRequest); List<SourceType> pushUpdateToQueue(final String topic, final String key,
            final SourceTypeRequest sourcetypeRequest); boolean getWaterSourceByNameAndCode(final String code, final String name, final String tenantId); List<SourceType> getWaterSourceTypes(final SourceTypeGetRequest waterSourceTypeGetRequest); }
SourceTypeService { public SourceTypeRequest create(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.create(waterSourceRequest); }  SourceTypeRequest create(final SourceTypeRequest waterSourceRequest); SourceTypeRequest update(final SourceTypeRequest waterSourceRequest); List<SourceType> pushCreateToQueue(final String topic, final String key,
            final SourceTypeRequest sourcetypeRequest); List<SourceType> pushUpdateToQueue(final String topic, final String key,
            final SourceTypeRequest sourcetypeRequest); boolean getWaterSourceByNameAndCode(final String code, final String name, final String tenantId); List<SourceType> getWaterSourceTypes(final SourceTypeGetRequest waterSourceTypeGetRequest);  }