PropertiesDAO { public Integer totalRecordCount() { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria totalRecord = session.createCriteria(Properties.class); totalRecord.setProjection(Projections.distinct(Projections.property("id.processId"))); int size = totalRecord.list().size(); session.getTransaction().commit(); session.close(); return size; }  List<Integer> list(Integer pageNum, Integer numResults); Integer totalRecordCount(); Properties get(PropertiesId propertiesId); PropertiesId insert(Properties properties); void update(Properties properties); void delete(PropertiesId propertiesId); List<Properties> getPropertiesForConfig(int processId, String configGroup); List<Properties> getPropertiesForBroadcast(int processId); void deleteByProcessId(com.wipro.ats.bdre.md.dao.jpa.Process process); List<Properties> getByProcessId(com.wipro.ats.bdre.md.dao.jpa.Process process); List<Properties> getByProcessIdCopy(com.wipro.ats.bdre.md.dao.jpa.Process process, Integer pageNum, Integer numResults); Integer totalRecordCount(com.wipro.ats.bdre.md.dao.jpa.Process process); void updateArrangePositions(Integer parentPid, List<PositionsInfo> positionsInfoList); String getPropertiesValueForConfigAndKey(int processId, String configGroup, String key);  }
@Ignore @Test public void testTotalRecordCount() throws Exception { LOGGER.info("Total Size of properties is:" + propertiesDAO.totalRecordCount()); }