LineageRelationDAO { public Integer totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(LineageRelation.class); Integer size = criteria.list().size(); session.getTransaction().commit(); session.close(); return size; }  List<LineageRelation> list(Integer pageNum, Integer numResults); List<LineageRelation> getNodeIdForNode(String nodeid); List<LineageRelation> getNodeIdForNodeWhenTarget(String nodeid); Integer totalRecordCount(); LineageRelation get(String id); String insert(LineageRelation lineageRelation); void update(LineageRelation lineageRelation); void delete(String id);  }
@Ignore @Test public void testTotalRecordCount() throws Exception { LOGGER.info("Size of LineageRelation is:" + lineageRelationDAO.totalRecordCount()); }