@Test public void shouldGetRefrigeratorsForDeliveryZoneAndProgram() throws Exception { Long deliveryZoneId = 1L; Long programId = 1L; List<Refrigerator> refrigerators = new ArrayList<>(); when(mapper.getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId)).thenReturn(refrigerators); List<Refrigerator> resultRefrigerators = repository.getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId); assertThat(resultRefrigerators, is(refrigerators)); verify(mapper).getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId); }
public List<Refrigerator> getRefrigeratorsForADeliveryZoneAndProgram(Long deliveryZoneId, Long programId) { return mapper.getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId); }
RefrigeratorRepository { public List<Refrigerator> getRefrigeratorsForADeliveryZoneAndProgram(Long deliveryZoneId, Long programId) { return mapper.getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId); } }
RefrigeratorRepository { public List<Refrigerator> getRefrigeratorsForADeliveryZoneAndProgram(Long deliveryZoneId, Long programId) { return mapper.getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId); }  }
RefrigeratorRepository { public List<Refrigerator> getRefrigeratorsForADeliveryZoneAndProgram(Long deliveryZoneId, Long programId) { return mapper.getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId); }  List<Refrigerator> getRefrigeratorsForADeliveryZoneAndProgram(Long deliveryZoneId, Long programId); void update(Refrigerator refrigerator); List<Refrigerator> getAllBy(Long facilityId); void insert(Refrigerator refrigerator); void disableAllFor(Long facilityId); }
RefrigeratorRepository { public List<Refrigerator> getRefrigeratorsForADeliveryZoneAndProgram(Long deliveryZoneId, Long programId) { return mapper.getRefrigeratorsForADeliveryZoneAndProgram(deliveryZoneId, programId); }  List<Refrigerator> getRefrigeratorsForADeliveryZoneAndProgram(Long deliveryZoneId, Long programId); void update(Refrigerator refrigerator); List<Refrigerator> getAllBy(Long facilityId); void insert(Refrigerator refrigerator); void disableAllFor(Long facilityId);  }