public static DiffResult diff(Graph left, Graph right) {
        List<Edge> removedEdges = left.edges().filter(e -> !right.hasEquivalentEdge(e)).collect(Collectors.toList());
        List<Vertex> removedVertices = left.vertices().filter(v -> !right.hasEquivalentVertex(v)).collect(Collectors.toList());
        List<Edge> addedEdges = right.edges().filter(e -> !left.hasEquivalentEdge(e)).collect(Collectors.toList());
        List<Vertex> addedVertices = right.vertices().filter(v -> !left.hasEquivalentVertex(v)).collect(Collectors.toList());
        return new DiffResult(removedEdges, addedEdges, removedVertices, addedVertices);
    }
@Test
    public void testDifferentSimpleGraphs() throws InvalidIRException {
        Graph left = simpleGraph();

        Graph right = left.copy();
        Vertex new1 = createTestVertex("new1");
        right.addVertex(new1);
        right.chainVerticesById("t3", "new1");

        GraphDiff.DiffResult result = GraphDiff.diff(left, right);

        assertFalse(result.isIdentical());

        assertThat(result.getAddedVertices().size(), is(1));
        assertThat(result.getAddedVertices().stream().findAny().get().getId(), is("new1"));

        assertThat(result.getAddedEdges().size(), is(1));
        Edge expectedEdge = new1.incomingEdges().findAny().get();
        assertTrue(result.getAddedEdges().stream().findAny().get().sourceComponentEquals(expectedEdge));

        assertTrue(result.getRemovedVertices().isEmpty());
        assertTrue(result.getRemovedEdges().isEmpty());
    }