ProcessTypeDAO { public List<ProcessType> list(Integer processTypeId) { Session session = sessionFactory.openSession(); session.beginTransaction(); List<ProcessType> processTypes = new ArrayList<ProcessType>(); if (processTypeId == null) { Criteria parentProcessTypeCriteria = session.createCriteria(ProcessType.class).add(Restrictions.isNull(PARENTPROCESSTYPEID)); processTypes = parentProcessTypeCriteria.list(); } else { Criteria processTypeCriteria = session.createCriteria(ProcessType.class).add(Restrictions.eq(PARENTPROCESSTYPEID, processTypeId)); processTypes = processTypeCriteria.list(); } session.getTransaction().commit(); session.close(); return processTypes; }  List<ProcessType> list(Integer processTypeId); List<ProcessType> listFull(Integer pageNum, Integer numResults); Integer totalRows(); Integer totalRecordCount(Integer processTypeId); ProcessType get(Integer id); Integer insert(ProcessType processType); void update(ProcessType processType); void delete(Integer id);  }
@Ignore @Test public void testList() throws Exception { LOGGER.info("Size of ProcessType is atleast:" + processTypeDAO.list(null).size()); }