BatchConsumpQueueDAO { public List<BatchConsumpQueue> list(Integer pageNum, Integer numResults) { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(BatchConsumpQueue.class).addOrder(Order.desc("queueId")); criteria.setFirstResult(pageNum); criteria.setMaxResults(numResults); List<BatchConsumpQueue> batchConsumpQueues = criteria.list(); session.getTransaction().commit(); session.close(); return batchConsumpQueues; }  List<BatchConsumpQueue> list(Integer pageNum, Integer numResults); Long totalRecordCount(); BatchConsumpQueue get(Long id); Long insert(BatchConsumpQueue batchConsumpQueue); void update(BatchConsumpQueue batchConsumpQueue); void delete(Long id); Integer getBCQForProcessId(Process process);  }
@Ignore @Test public void testList() throws Exception { LOGGER.info("Size of BatchConsumpQueue is atleast:" + batchConsumpQueueDAO.list(0, 10).size()); }