@Test
public void endCreateActivityTest() throws Exception {

    // Setup:
    Resource recordIRI = VALUE_FACTORY.createIRI(recordIri);
    utils.endCreateActivity(createActivity, recordIRI);
    verify(provenanceService).updateActivity(createActivity);
    assertTrue(createActivity.getModel().contains(createActivity.getResource(), VALUE_FACTORY.createIRI(Activity.endedAtTime_IRI), null));
    assertEquals(1, createActivity.getGenerated().size());
    Entity resultEntity = createActivity.getGenerated().iterator().next();
    assertEquals(VALUE_FACTORY.createIRI(recordIri), resultEntity.getResource());
    assertTrue(resultEntity.getModel().contains(resultEntity.getResource(), VALUE_FACTORY.createIRI(Entity.generatedAtTime_IRI), null));
    assertTrue(resultEntity.getModel().contains(resultEntity.getResource(), VALUE_FACTORY.createIRI(predAtLocation), VALUE_FACTORY.createLiteral("system")));
}