@Test
public void endDeleteActivityTest() throws Exception {

    // Setup
    entity.addProperty(VALUE_FACTORY.createLiteral("system"), VALUE_FACTORY.createIRI(predAtLocation));
    deleteActivity.addInvalidated(entity);
    deleteActivity.getModel().addAll(entity.getModel());
    utils.endDeleteActivity(deleteActivity, record);
    verify(provenanceService).updateActivity(deleteActivity);
    assertTrue(deleteActivity.getModel().contains(deleteActivity.getResource(), VALUE_FACTORY.createIRI(Activity.endedAtTime_IRI), null));
    assertEquals(1, deleteActivity.getInvalidated().size());
    Entity resultEntity = deleteActivity.getInvalidated().iterator().next();
    assertTrue(resultEntity.getModel().contains(resultEntity.getResource(), VALUE_FACTORY.createIRI(Entity.invalidatedAtTime_IRI), null));
    assertTrue(resultEntity.getModel().contains(resultEntity.getResource(), VALUE_FACTORY.createIRI(_Thing.title_IRI), VALUE_FACTORY.createLiteral("Test Record")));
}