@Test
public void testGetCommitDifference() throws Exception {

    // Setup:
    Model addModel = MODEL_FACTORY.createModel(Collections.singleton(
            VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/add"), titleIRI, VALUE_FACTORY.createLiteral("Add"))));
    Model delModel = MODEL_FACTORY.createModel(Collections.singleton(
            VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/delete"), titleIRI, VALUE_FACTORY.createLiteral("Delete"))));
    Difference expect = new Difference.Builder().additions(addModel).deletions(delModel).build();
    doReturn(expect).when(utilsService).getCommitDifference(eq(COMMIT_IRI), any(RepositoryConnection.class));
    Difference result = manager.getCommitDifference(COMMIT_IRI);
    verify(utilsService).validateResource(eq(COMMIT_IRI), eq(commitFactory.getTypeIRI()), any(RepositoryConnection.class));
    verify(utilsService).getCommitDifference(eq(COMMIT_IRI), any(RepositoryConnection.class));
    assertEquals(expect, result);
}