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