HibernateDrugInventoryDAO implements DrugInventoryDAO { public DrugInventory getDrugInventoryByUuid(String uuid) { Criteria criteria = sessionFactory.getCurrentSession().createCriteria(DrugInventory.class); criteria.add(Restrictions.eq("uuid", uuid)); System.out.println(" return (DrugInventory) criteria.uniqueResult(); }  void setSessionFactory(SessionFactory sessionFactory); DrugInventory saveDrugInventory(DrugInventory drugInventory); void deleteDrugInventory(DrugInventory drugInventory); DrugInventory getDrugInventoryByUuid(String uuid); List<DrugInventory> getAllDrugInventories(); List<DrugInventory> getAllDrugInventoriesByStatus(String status); DrugInventory updateDrugInventory(DrugInventory drugInventory); List<DrugInventory> getDrugInventoryByProvider(Integer providerId); @Override List<DrugInventory> getDrugInventoriesByLocation(Integer location); @Override List<DrugInventory> getDrugInventoriesByDrugPurchaseOrder(Integer drugPurchaseOrderId);  }
@Test public void testGetDrugInventoryByUuid() { DrugInventory result = dao.getDrugInventoryByUuid("68547121-1b70-465c-99ee-c9dfd95e7d36"); String name = result.getName(); assertEquals(name, "Test drug inventory"); }