@Test
public void updateCommitWithCommitAndQuadsTest() {

    try (RepositoryConnection conn = repo.getConnection()) {
        // Setup:
        Commit commit = getThing(VALUE_FACTORY.createIRI(COMMITS + "quad-test1"), commitFactory, conn);
        Resource graph1 = VALUE_FACTORY.createIRI(GRAPHS + "quad-graph1");
        Resource graphTest = VALUE_FACTORY.createIRI(GRAPHS + "quad-graph-test");
        Statement addQuad = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("https://mobi.com/test"), titleIRI, VALUE_FACTORY.createLiteral("Title"), graphTest);
        Statement addAndDeleteQuad = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("https://mobi.com/test"), descriptionIRI, VALUE_FACTORY.createLiteral("Description"), graph1);
        Statement deleteQuad = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("https://mobi.com/test/object2"), labelIRI, VALUE_FACTORY.createLiteral("Label"), graph1);
        Statement existingAddQuad = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/object2"), titleIRI, VALUE_FACTORY.createLiteral("Test 1 Title"), graph1);
        Model additions = MODEL_FACTORY.createModel(Stream.of(addQuad, addAndDeleteQuad).collect(Collectors.toSet()));
        Model deletions = MODEL_FACTORY.createModel(Stream.of(addAndDeleteQuad, deleteQuad, existingAddQuad).collect(Collectors.toSet()));
        Resource additionsGraph = VALUE_FACTORY.createIRI(Catalogs.ADDITIONS_NAMESPACE + "quad-test1");
        Resource deletionsGraph = VALUE_FACTORY.createIRI(Catalogs.DELETIONS_NAMESPACE + "quad-test1");
        Statement expAdd1 = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/object1"), titleIRI, VALUE_FACTORY.createLiteral("Test 1 Title"), additionsGraph);
        Statement expDel1 = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/object1"), titleIRI, VALUE_FACTORY.createLiteral("Test 0 Title"), deletionsGraph);
        Resource additionsGraph1 = VALUE_FACTORY.createIRI(Catalogs.ADDITIONS_NAMESPACE + "quad-test1%00http%3A%2F%2Fmobi.com%2Ftest%2Fgraphs%23quad-graph1");
        Resource deletionsGraph1 = VALUE_FACTORY.createIRI(Catalogs.DELETIONS_NAMESPACE + "quad-test1%00http%3A%2F%2Fmobi.com%2Ftest%2Fgraphs%23quad-graph1");
        Statement expAddGraph1 = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/object2"), typeIRI, OWL_THING, additionsGraph1);
        Statement expDelGraph1 = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("https://mobi.com/test/object2"), labelIRI, VALUE_FACTORY.createLiteral("Label"), deletionsGraph1);
        Resource additionsGraphTest = VALUE_FACTORY.createIRI(Catalogs.ADDITIONS_NAMESPACE + "quad-test1%00http%3A%2F%2Fmobi.com%2Ftest%2Fgraphs%23quad-graph-test");
        Resource deletionsGraphTest = VALUE_FACTORY.createIRI(Catalogs.DELETIONS_NAMESPACE + "quad-test1%00http%3A%2F%2Fmobi.com%2Ftest%2Fgraphs%23quad-graph-test");
        Statement expAddGraphTest = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("https://mobi.com/test"), titleIRI, VALUE_FACTORY.createLiteral("Title"), additionsGraphTest);
        service.updateCommit(commit, additions, deletions, conn);
        List<Statement> adds = RepositoryResults.asList(conn.getStatements(null, null, null, additionsGraph));
        assertEquals(1, adds.size());
        assertTrue(adds.contains(expAdd1));
        List<Statement> dels = RepositoryResults.asList(conn.getStatements(null, null, null, deletionsGraph));
        assertEquals(1, dels.size());
        assertTrue(dels.contains(expDel1));
        List<Statement> addsGraph1 = RepositoryResults.asList(conn.getStatements(null, null, null, additionsGraph1));
        assertEquals(1, addsGraph1.size());
        assertTrue(addsGraph1.contains(expAddGraph1));
        List<Statement> delsGraph1 = RepositoryResults.asList(conn.getStatements(null, null, null, deletionsGraph1));
        assertEquals(1, delsGraph1.size());
        assertTrue(delsGraph1.contains(expDelGraph1));
        List<Statement> addsGraphTest = RepositoryResults.asList(conn.getStatements(null, null, null, additionsGraphTest));
        assertEquals(1, addsGraphTest.size());
        assertTrue(addsGraphTest.contains(expAddGraphTest));
        List<Statement> delsGraphTest = RepositoryResults.asList(conn.getStatements(null, null, null, deletionsGraphTest));
        assertEquals(0, delsGraphTest.size());
    }
}