ArchiveConsumpQueueDAO { public List<ArchiveConsumpQueue> list(Integer pageNum, Integer numResults) { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(ArchiveConsumpQueue.class).addOrder(Order.desc("batchByTargetBatchId.batchId")); criteria.setFirstResult(pageNum); criteria.setMaxResults(numResults); List<ArchiveConsumpQueue> archiveConsumpQueues = criteria.list(); session.getTransaction().commit(); session.close(); return archiveConsumpQueues; }  List<ArchiveConsumpQueue> list(Integer pageNum, Integer numResults); Long totalRecordCount(); ArchiveConsumpQueue get(Long id); Long insert(ArchiveConsumpQueue archiveConsumpQueue); void update(ArchiveConsumpQueue archiveConsumpQueue); void delete(Long id);  }
@Ignore @Test public void testList() throws Exception { LOGGER.info("Size of ArchiveConsumpQueue is atleast: " + archiveConsumpQueueDAO.list(0, 10).size()); }