ExecStatusDAO { public Long totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); long size = session.createCriteria(ExecStatus.class).list().size(); session.getTransaction().commit(); session.close(); return size; }  List<ExecStatus> list(Integer pageNum, Integer numResults); Long totalRecordCount(); ExecStatus get(Integer id); Integer insert(ExecStatus execStatus); void update(ExecStatus execStatus); void delete(Integer id);  }
@Ignore @Test public void testTotalRecordCount() throws Exception { LOGGER.info("Size of ExecStatus is:" + execStatusDAO.totalRecordCount()); }