@SuppressWarnings("unchecked") @Test(expected = Exception.class) public void test_throwException_Update_TreatmentPlant() throws Exception { final TreatmentPlantRequest treatmentPlantRequest = Mockito.mock(TreatmentPlantRequest.class); when(treatmentPlantRepository.update(treatmentPlantRequest)).thenThrow(Exception.class); assertTrue(treatmentPlantRequest.equals(treatmentPlantService.update(treatmentPlantRequest))); }
public TreatmentPlantRequest update(final TreatmentPlantRequest treatmentPlantRequest) { return treatmentPlantRepository.update(treatmentPlantRequest); }
TreatmentPlantService { public TreatmentPlantRequest update(final TreatmentPlantRequest treatmentPlantRequest) { return treatmentPlantRepository.update(treatmentPlantRequest); } }
TreatmentPlantService { public TreatmentPlantRequest update(final TreatmentPlantRequest treatmentPlantRequest) { return treatmentPlantRepository.update(treatmentPlantRequest); }  }
TreatmentPlantService { public TreatmentPlantRequest update(final TreatmentPlantRequest treatmentPlantRequest) { return treatmentPlantRepository.update(treatmentPlantRequest); }  TreatmentPlantRequest create(final TreatmentPlantRequest treatmentPlantRequest); TreatmentPlantRequest update(final TreatmentPlantRequest treatmentPlantRequest); List<TreatmentPlant> pushCreateToQueue(final String topic, final String key,
            final TreatmentPlantRequest treatmentPlantRequest); List<TreatmentPlant> pushUpdateToQueue(final String topic, final String key,
            final TreatmentPlantRequest treatmentPlantRequest); List<TreatmentPlant> getTreatmentPlant(final TreatmentPlantGetRequest treatmentPlantGetRequest); boolean getTreatmentPlantByNameAndCode(final String code, final String name, final String tenantId); boolean checkStorageReservoirExists(final String storageReservoirName, final String tenantId); }
TreatmentPlantService { public TreatmentPlantRequest update(final TreatmentPlantRequest treatmentPlantRequest) { return treatmentPlantRepository.update(treatmentPlantRequest); }  TreatmentPlantRequest create(final TreatmentPlantRequest treatmentPlantRequest); TreatmentPlantRequest update(final TreatmentPlantRequest treatmentPlantRequest); List<TreatmentPlant> pushCreateToQueue(final String topic, final String key,
            final TreatmentPlantRequest treatmentPlantRequest); List<TreatmentPlant> pushUpdateToQueue(final String topic, final String key,
            final TreatmentPlantRequest treatmentPlantRequest); List<TreatmentPlant> getTreatmentPlant(final TreatmentPlantGetRequest treatmentPlantGetRequest); boolean getTreatmentPlantByNameAndCode(final String code, final String name, final String tenantId); boolean checkStorageReservoirExists(final String storageReservoirName, final String tenantId);  }