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