UsersDAO { public Integer totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(Users.class); Integer size = criteria.list().size(); session.getTransaction().commit(); session.close(); return size; }  List<Users> list(Integer pageNum, Integer numResults); Integer totalRecordCount(); Users get(String id); String insert(Users users); void update(Users users); void delete(String id);  }
@Ignore @Test public void testTotalRecordCount() throws Exception { LOGGER.info("Size of Users is:" + usersDAO.totalRecordCount()); }