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