LineageQueryDAO { public Integer totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(LineageQuery.class); Integer size = criteria.list().size(); session.getTransaction().commit(); session.close(); return size; }  List<LineageQuery> list(Integer pageNum, Integer numResults); List<LineageQuery> listAll(); List<LineageQuery> getLastInstanceExecLists(Integer processId); Integer totalRecordCount(); LineageQuery get(String id); String insert(LineageQuery lineageQuery); void update(LineageQuery lineageQuery); void delete(String id);  }
@Ignore @Test public void testTotalRecordCount() throws Exception { LOGGER.info("Size of LineageQuery is:" + lineageQueryDAO.totalRecordCount()); }