protected boolean same(final Graph g1, final Graph g2) {
        final Iterator<Vertex> itty = g1.vertices();
        try {
            return IteratorUtils.stream(itty)
                    .map(v -> Triplet.<Integer, List<Vertex>, List<Vertex>>with(v.value("oid"), IteratorUtils.list(v.vertices(Direction.IN)), IteratorUtils.list(v.vertices(Direction.OUT))))
                    .allMatch(p -> {
                        final Iterator<Vertex> innerItty = g2.vertices();
                        final Vertex v = IteratorUtils.filter(innerItty, vx -> vx.value("oid").equals(p.getValue0())).next();
                        CloseableIterator.closeIterator(innerItty);
                        return sameInVertices(v, p.getValue1()) && sameOutVertices(v, p.getValue2());
                    });
        } finally {
            CloseableIterator.closeIterator(itty);
        }
    }
Asserts that two graphs are the "same" in way of structure.  It assumes that the graphs both have vertices
with an "oid" property that is an Integer value.  It iterates each vertex in graph 1, using the "oid" to
lookup vertices in graph 2.  For each one found it checks both IN and OUT vertices to ensure that they
attach to the same IN/OUT vertices given their "oid" properties.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/AbstractGeneratorTest.java