LineageNodeDAO { public Integer totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(LineageNode.class); Integer size = criteria.list().size(); session.getTransaction().commit(); session.close(); return size; }  List<LineageNode> list(Integer pageNum, Integer numResults); Integer totalRecordCount(); LineageNode get(String id); List<LineageNode> getTableNode(String tableName); String getContainerDot(String nodeid); String insert(LineageNode lineageNode); LineageNode getColNodeId(String colName, LineageNode tableNode); void update(LineageNode lineageNode); void delete(String id);  }
@Ignore @Test public void testTotalRecordCount() throws Exception { LOGGER.info("Size of LineageNode is:" + lineageNodeDAO.totalRecordCount()); }