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