@Test public void shouldGetInventoryById() throws Exception { EquipmentInventory equipment = new EquipmentInventory(); equipment.setSerialNumber("123"); when(repository.getInventoryById(1L)).thenReturn(equipment); EquipmentInventory result = service.getInventoryById(1L); assertEquals(result.getSerialNumber(), equipment.getSerialNumber()); }
public EquipmentInventory getInventoryById(Long id){ return repository.getInventoryById(id); }
EquipmentInventoryService { public EquipmentInventory getInventoryById(Long id){ return repository.getInventoryById(id); } }
EquipmentInventoryService { public EquipmentInventory getInventoryById(Long id){ return repository.getInventoryById(id); }  }
EquipmentInventoryService { public EquipmentInventory getInventoryById(Long id){ return repository.getInventoryById(id); }  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 EquipmentInventory getInventoryById(Long id){ return repository.getInventoryById(id); }  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();  }