UsersDAO { public List<Users> list(Integer pageNum, Integer numResults) { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(Users.class); criteria.setFirstResult(pageNum); criteria.setMaxResults(numResults); List<Users> users = criteria.list(); session.getTransaction().commit(); session.close(); return users; }  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 testList() throws Exception { LOGGER.info("Size of Users is atleast:" + usersDAO.list(0, 10).size()); }