WorkflowTypeDAO { public Integer totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(WorkflowType.class); Integer size = criteria.list().size(); session.getTransaction().commit(); session.close(); return size; }  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 testTotalRecordCount() throws Exception { LOGGER.info("Size of WorkflowType is:" + workflowTypeDAO.totalRecordCount()); }