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