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