DataQualityDAO { public void deleteDQSetup(int pid) { Session session = sessionFactory.openSession(); try { session.beginTransaction(); Criteria deletePropertiesCriteria = session.createCriteria(Properties.class).add(Restrictions.eq(PROCESSID, pid)); deletePropertiesCriteria.add(Restrictions.eq(CONFIGGROUP, "dq")); List<Properties> deletingProperties = deletePropertiesCriteria.list(); Iterator<Properties> iterator = deletingProperties.iterator(); while (iterator.hasNext()) { Properties properties = iterator.next(); session.delete(properties); } session.getTransaction().commit(); } catch (MetadataException e) { session.getTransaction().rollback(); LOGGER.error(e); } finally { session.close(); } }  void deleteDQSetup(int pid); List<com.wipro.ats.bdre.md.beans.table.Properties> listDQSetup(int startPage, int pageSize); List<com.wipro.ats.bdre.md.beans.table.Properties> insertDQSetup(DQSetupInfo dqSetupInfo,String username); List<com.wipro.ats.bdre.md.beans.table.Properties> updateDQSetup(DQSetupInfo dqSetupInfo);  }
@Ignore @Test public void deleteTest() { dataQualityDAO.deleteDQSetup(10901); }