@SuppressWarnings("unchecked") @Test(expected = Exception.class) public void test_throwException_Update_WaterSource() throws Exception { final SourceTypeRequest waterSourceRequest = Mockito.mock(SourceTypeRequest.class); when(waterSourceTypeRepository.update(waterSourceRequest)).thenThrow(Exception.class); assertTrue(waterSourceRequest.equals(waterSourceTypeService.update(waterSourceRequest))); }
public SourceTypeRequest update(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.update(waterSourceRequest); }
SourceTypeService { public SourceTypeRequest update(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.update(waterSourceRequest); } }
SourceTypeService { public SourceTypeRequest update(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.update(waterSourceRequest); }  }
SourceTypeService { public SourceTypeRequest update(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.update(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 update(final SourceTypeRequest waterSourceRequest) { return waterSourceTypeRepository.update(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);  }