@Test
public void removeInProgressCommitWithQuadsTest() throws Exception {

    IRI quadInProgressCommit = VALUE_FACTORY.createIRI(COMMITS + "quad-in-progress-commit");
    try (RepositoryConnection conn = repo.getConnection()) {
        // Setup:
        InProgressCommit commit = getThing(quadInProgressCommit, inProgressCommitFactory, conn);
        Resource additionsResource = getAdditionsResource(quadInProgressCommit);
        Resource deletionsResource = getDeletionsResource(quadInProgressCommit);
        assertTrue(conn.containsContext(additionsResource));
        assertTrue(conn.containsContext(deletionsResource));
        IRI graph1AdditionsResource = getQuadAdditionsResource(quadInProgressCommit, GRAPHS + "quad-graph1");
        IRI graph1DeletionsResource = getQuadDeletionsResource(quadInProgressCommit, GRAPHS + "quad-graph1");
        assertTrue(conn.containsContext(graph1AdditionsResource));
        assertTrue(conn.containsContext(graph1DeletionsResource));
        service.removeInProgressCommit(commit, conn);
        assertFalse(conn.containsContext(quadInProgressCommit));
        assertFalse(conn.containsContext(additionsResource));
        assertFalse(conn.containsContext(deletionsResource));
        assertFalse(conn.containsContext(graph1AdditionsResource));
        assertFalse(conn.containsContext(graph1DeletionsResource));
    }
}