PropertiesDAO { public List<Properties> getPropertiesForConfig(int processId, String configGroup) { List<Properties> propertiesList = new ArrayList<Properties>(); Session session = sessionFactory.openSession(); try { session.beginTransaction(); Criteria cr = session.createCriteria(Properties.class).add(Restrictions.eq("process.processId", processId)).add(Restrictions.eq("configGroup", configGroup)); propertiesList = cr.list(); session.getTransaction().commit(); } catch (Exception e) { session.getTransaction().rollback(); LOGGER.info("Error " + e); return propertiesList; } finally { session.close(); } return propertiesList; }  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 testGetPropertiesForConfig() throws Exception { for (Properties property : propertiesDAO.getPropertiesForConfig(10835, "PL_ACCOUNT_TABLE")) { LOGGER.info("Properties fetched:" + property.getConfigGroup() + " " + property.getId().getPropKey() + " " + property.getId().getProcessId() + " " + property.getPropValue()); } }