ServersDAO { public List<Servers> list(Integer pageNum, Integer numResults) { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(Servers.class); criteria.setFirstResult(pageNum); criteria.setMaxResults(numResults); List<Servers> servers = criteria.list(); session.getTransaction().commit(); session.close(); return servers; }  List<Servers> list(Integer pageNum, Integer numResults); Integer totalRecordCount(); Servers get(Integer id); Integer insert(Servers servers); void update(Servers servers); void delete(Integer id);  }
@Ignore @Test public void testList() throws Exception { LOGGER.info("Size of Servers is atleast:" + serversDAO.list(0, 10).size()); }