@Test
public void addChangesTest() {

    try (RepositoryConnection conn = repo.getConnection()) {
        // Setup:
        Resource additionId = getAdditionsResource(COMMIT_IRI);
        Resource deletionId = getDeletionsResource(COMMIT_IRI);
        Statement statement1 = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("https://mobi.com/test"), titleIRI, VALUE_FACTORY.createLiteral("Title"));
        Statement existingAddStatement = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/add"), titleIRI, VALUE_FACTORY.createLiteral("Add"));
        Statement existingDeleteStatement = VALUE_FACTORY.createStatement(VALUE_FACTORY.createIRI("http://mobi.com/test/delete"), titleIRI, VALUE_FACTORY.createLiteral("Delete"));
        Model additions = MODEL_FACTORY.createModel(Stream.of(statement1, existingDeleteStatement).collect(Collectors.toSet()));
        Model expectedAdditions = MODEL_FACTORY.createModel(Stream.of(existingAddStatement, statement1).collect(Collectors.toSet()));
        service.addChanges(additionId, deletionId, additions, conn);
        conn.getStatements(null, null, null, additionId).forEach(statement ->
                assertTrue(expectedAdditions.contains(statement.getSubject(), statement.getPredicate(), statement.getObject())));
        assertEquals(0, conn.size(deletionId));
    }
}