@Test public void shouldFindTreatmentByProductCode(){ Treatment treatmentForProduct = ImplementationUtils.findTreatmentForProduct(treatments, productCode); assertThat(treatmentForProduct.getProduct().getCode() ,is(productCode)); }
public static Treatment findTreatmentForProduct(Collection<Treatment> treatments, String productCode) { for (Treatment treatment : treatments) { if (treatment.getProduct().getCode().equals(productCode)) { return treatment; } } return null; }
ImplementationUtils { public static Treatment findTreatmentForProduct(Collection<Treatment> treatments, String productCode) { for (Treatment treatment : treatments) { if (treatment.getProduct().getCode().equals(productCode)) { return treatment; } } return null; } }
ImplementationUtils { public static Treatment findTreatmentForProduct(Collection<Treatment> treatments, String productCode) { for (Treatment treatment : treatments) { if (treatment.getProduct().getCode().equals(productCode)) { return treatment; } } return null; } private  ImplementationUtils(); }
ImplementationUtils { public static Treatment findTreatmentForProduct(Collection<Treatment> treatments, String productCode) { for (Treatment treatment : treatments) { if (treatment.getProduct().getCode().equals(productCode)) { return treatment; } } return null; } private  ImplementationUtils(); static void mapForProduct(Implementation implementation, String productName,
                                     ImplementationReportViewModel report); static Treatment findTreatmentForProduct(Collection<Treatment> treatments, String productCode); static Implementation findImplementationForExecutor(Collection<Implementation> implementations, String executor); }
ImplementationUtils { public static Treatment findTreatmentForProduct(Collection<Treatment> treatments, String productCode) { for (Treatment treatment : treatments) { if (treatment.getProduct().getCode().equals(productCode)) { return treatment; } } return null; } private  ImplementationUtils(); static void mapForProduct(Implementation implementation, String productName,
                                     ImplementationReportViewModel report); static Treatment findTreatmentForProduct(Collection<Treatment> treatments, String productCode); static Implementation findImplementationForExecutor(Collection<Implementation> implementations, String executor); static final String CURRENT_TREATMENT_SETTER; static final String EXISTING_STOCK_SETTER; }