Source:
public void destroyObjectsInDifferentTreesTest() { initializeJob(objsToDestroy); job.run(); PID folderObj2Pid = objsToDestroy.get(3); PID fileObjPid = objsToDestroy.get(2); PID workObjPid = objsToDestroy.get(1); PID folderObjPid = objsToDestroy.get(0); verify(spyProxyService).destroyProxy(folderObjPid); verify(spyProxyService).destroyProxy(folderObj2Pid); FileObject fileObj = repoObjLoader.getFileObject(fileObjPid); WorkObject workObj = repoObjLoader.getWorkObject(workObjPid); FolderObject folderObj = repoObjLoader.getFolderObject(folderObjPid); FolderObject folderObj2 = repoObjLoader.getFolderObject(folderObj2Pid); assertTrue(fileObj.getModel().contains(fileObj.getResource(), RDF.type, Cdr.Tombstone)); assertTrue(workObj.getModel().contains(workObj.getResource(), RDF.type, Cdr.Tombstone)); assertTrue(folderObj.getModel().contains(folderObj.getResource(), RDF.type, Cdr.Tombstone)); assertTrue(folderObj2.getModel().contains(folderObj2.getResource(), RDF.type, Cdr.Tombstone)); PremisEventObject event = repoObjLoader.getPremisEventObject(folderObj.getPremisLog().listEvents().get(0)); assertTrue(event.getResource().hasProperty(Premis.hasEventType, Premis.Deletion)); assertTrue(event.getResource().hasProperty(Premis.hasEventDetail, "Item deleted from repository and replaced by tombstone")); PremisEventObject event2 = repoObjLoader.getPremisEventObject(folderObj2.getPremisLog().listEvents().get(0)); assertTrue(event.getResource().hasProperty(Premis.hasEventType, Premis.Deletion)); assertTrue(event.getResource().hasProperty(Premis.hasEventDetail, "Item deleted from repository and replaced by tombstone")); }

Target:
public void destroyObjectsInDifferentTreesTest() { initializeJob(objsToDestroy); job.run(); PID folderObj2Pid = objsToDestroy.get(3); PID fileObjPid = objsToDestroy.get(2); PID workObjPid = objsToDestroy.get(1); PID folderObj1Pid = objsToDestroy.get(0); verify(spyProxyService).destroyProxy(folderObj1Pid); verify(spyProxyService).destroyProxy(folderObj2Pid); Tombstone stoneFile = repoObjLoader.getTombstone(fileObjPid); Tombstone stoneWork = repoObjLoader.getTombstone(workObjPid); Tombstone stoneFolder1 = repoObjLoader.getTombstone(folderObj1Pid); Tombstone stoneFolder2 = repoObjLoader.getTombstone(folderObj2Pid); assertTrue(stoneFile.getModel().contains(stoneFile.getResource(), RDF.type, Cdr.Tombstone)); assertTrue(stoneWork.getModel().contains(stoneWork.getResource(), RDF.type, Cdr.Tombstone)); assertTrue(stoneFolder1.getModel().contains(stoneFolder1.getResource(), RDF.type, Cdr.Tombstone)); assertTrue(stoneFolder2.getModel().contains(stoneFolder2.getResource(), RDF.type, Cdr.Tombstone)); PremisEventObject event = repoObjLoader.getPremisEventObject(stoneFolder1.getPremisLog().listEvents().get(0)); assertTrue(event.getResource().hasProperty(Premis.hasEventType, Premis.Deletion)); assertTrue(event.getResource().hasProperty(Premis.hasEventDetail, "Item deleted from repository and replaced by tombstone")); PremisEventObject event2 = repoObjLoader.getPremisEventObject(stoneFolder2.getPremisLog().listEvents().get(0)); assertTrue(event2.getResource().hasProperty(Premis.hasEventType, Premis.Deletion)); assertTrue(event2.getResource().hasProperty(Premis.hasEventDetail, "Item deleted from repository and replaced by tombstone")); }