### Question:
ChangeSetDAO extends BasicDAO<MongoDBChangeSet, ObjectId> { public void deleteChangeSets(int resourceId, String driftDefName) { deleteByQuery(createQuery() .field("resourceId").equal(resourceId) .field("driftDefName").equal(driftDefName)); } ChangeSetDAO(Morphia morphia, Mongo mongo, String db); List<MongoDBChangeSet> findByChangeSetCritiera(DriftChangeSetCriteria criteria); List<MongoDBChangeSet> findByDriftCriteria(DriftCriteria criteria); List<MongoDBChangeSetEntry> findEntries(DriftCriteria criteria); MongoDBChangeSetEntry findEntryById(ObjectId changeSetId, String entryId); void deleteChangeSets(int resourceId, String driftDefName);  }### Answer:
@Test(enabled = ENABLED) public void deleteChangeSets() throws Exception { MongoDBChangeSet c1 = new MongoDBChangeSet(); c1.setCategory(DRIFT); c1.setVersion(1); c1.setResourceId(1); c1.setDriftDefinitionId(1); c1.setDriftDefinitionName("delete-test"); dao.save(c1); MongoDBChangeSet c2 = new MongoDBChangeSet(); c2.setCategory(DRIFT); c2.setVersion(2); c2.setResourceId(1); c2.setDriftDefinitionId(1); c2.setDriftDefinitionName("delete-test"); dao.save(c2); dao.deleteChangeSets(1, "delete-test"); assertTrue(dao.find().asList().isEmpty(), "Failed to delete one or more change sets"); }