BatchConsumpQueueDAO { public Long totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); long size = session.createCriteria(BatchConsumpQueue.class).list().size(); session.getTransaction().commit(); session.close(); return size; }  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 testTotalRecordCount() throws Exception { LOGGER.info("Size of BatchConsumpQueue is:" + batchConsumpQueueDAO.totalRecordCount()); }