@Test public void shouldGetInventoryForFacility() throws Exception { List<EquipmentInventory> expectedEquipments = new ArrayList<>(); expectedEquipments.add(new EquipmentInventory()); when(repository.getFacilityInventory(1L, 1L)).thenReturn(expectedEquipments); List<EquipmentInventory> equipments = service.getInventoryForFacility(1L, 1L); verify(repository).getFacilityInventory(1L, 1L); assertEquals(equipments, expectedEquipments); }
public List<EquipmentInventory> getInventoryForFacility(Long facilityId, Long programId){ return repository.getFacilityInventory(facilityId, programId); }
EquipmentInventoryService { public List<EquipmentInventory> getInventoryForFacility(Long facilityId, Long programId){ return repository.getFacilityInventory(facilityId, programId); } }
EquipmentInventoryService { public List<EquipmentInventory> getInventoryForFacility(Long facilityId, Long programId){ return repository.getFacilityInventory(facilityId, programId); }  }
EquipmentInventoryService { public List<EquipmentInventory> getInventoryForFacility(Long facilityId, Long programId){ return repository.getFacilityInventory(facilityId, programId); }  List<EquipmentInventory> getInventoryForFacility(Long facilityId, Long programId); List<EquipmentInventory> getInventory(Long userId, Long typeId, Long programId, Long equipmentTypeId, Pagination pagination); Integer getInventoryCount(Long userId, Long typeId, Long programId, Long equipmentTypeId); EquipmentInventory getInventoryById(Long id); void save(EquipmentInventory inventory); void updateStatus(EquipmentInventory inventory); void updateNonFunctionalEquipments(); }
EquipmentInventoryService { public List<EquipmentInventory> getInventoryForFacility(Long facilityId, Long programId){ return repository.getFacilityInventory(facilityId, programId); }  List<EquipmentInventory> getInventoryForFacility(Long facilityId, Long programId); List<EquipmentInventory> getInventory(Long userId, Long typeId, Long programId, Long equipmentTypeId, Pagination pagination); Integer getInventoryCount(Long userId, Long typeId, Long programId, Long equipmentTypeId); EquipmentInventory getInventoryById(Long id); void save(EquipmentInventory inventory); void updateStatus(EquipmentInventory inventory); void updateNonFunctionalEquipments();  }