@SuppressWarnings("unchecked") @Test(expected = Exception.class) public void test_Should_Search_TreatmentPlant() { final List<TreatmentPlant> treatmentPlantList = new ArrayList<>(); treatmentPlantList.add(getTreatmentPlant()); final TreatmentPlantGetRequest treatmentPlantGetRequest = Mockito.mock(TreatmentPlantGetRequest.class); when(treatmentPlantRepository.findForCriteria(treatmentPlantGetRequest)).thenThrow(Exception.class); assertTrue(treatmentPlantList.equals(treatmentPlantService.getTreatmentPlant(treatmentPlantGetRequest))); }
public List<TreatmentPlant> getTreatmentPlant(final TreatmentPlantGetRequest treatmentPlantGetRequest) { return treatmentPlantRepository.findForCriteria(treatmentPlantGetRequest); }
TreatmentPlantService { public List<TreatmentPlant> getTreatmentPlant(final TreatmentPlantGetRequest treatmentPlantGetRequest) { return treatmentPlantRepository.findForCriteria(treatmentPlantGetRequest); } }
TreatmentPlantService { public List<TreatmentPlant> getTreatmentPlant(final TreatmentPlantGetRequest treatmentPlantGetRequest) { return treatmentPlantRepository.findForCriteria(treatmentPlantGetRequest); }  }
TreatmentPlantService { public List<TreatmentPlant> getTreatmentPlant(final TreatmentPlantGetRequest treatmentPlantGetRequest) { return treatmentPlantRepository.findForCriteria(treatmentPlantGetRequest); }  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 List<TreatmentPlant> getTreatmentPlant(final TreatmentPlantGetRequest treatmentPlantGetRequest) { return treatmentPlantRepository.findForCriteria(treatmentPlantGetRequest); }  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);  }