@Test
public void testCreateInProgressCommit() throws Exception {

    // Setup:
    IRI provWasDerivedFrom = VALUE_FACTORY.createIRI(Entity.wasDerivedFrom_IRI);
    IRI provGenerated = VALUE_FACTORY.createIRI(Activity.generated_IRI);
    IRI provWasAssociatedWith = VALUE_FACTORY.createIRI(Activity.wasAssociatedWith_IRI);
    IRI provWasInformedBy = VALUE_FACTORY.createIRI(Activity.wasInformedBy_IRI);
    User user = userFactory.createNew(USER_IRI);
    InProgressCommit result = manager.createInProgressCommit(user);
    assertTrue(result.getProperty(provWasAssociatedWith).isPresent());
    assertEquals(USER_IRI.stringValue(), result.getProperty(provWasAssociatedWith).get().stringValue());
    assertTrue(result.getProperty(provGenerated).isPresent());
    Revision revision = revisionFactory.createNew((Resource) result.getProperty(provGenerated).get(),
            result.getModel());
    assertTrue(revision.getAdditions().isPresent());
    assertTrue(revision.getDeletions().isPresent());
    result = manager.createInProgressCommit(user);
    assertEquals(USER_IRI.stringValue(), result.getProperty(provWasAssociatedWith).get().stringValue());
    assertTrue(result.getProperty(provGenerated).isPresent());
    assertFalse(result.getProperty(provWasInformedBy).isPresent());
    revision = revisionFactory.createNew((Resource) result.getProperty(provGenerated).get(),
            result.getModel());
    assertTrue(revision.getAdditions().isPresent());
    assertTrue(revision.getDeletions().isPresent());
    assertFalse(revision.getProperty(provWasDerivedFrom).isPresent());
}