public static void cloneElements(final Graph original, final Graph clone) {
    original.vertices().forEachRemaining(v -> DetachedFactory.detach(v, true).attach(Attachable.Method.create(clone)));
    original.edges().forEachRemaining(e -> DetachedFactory.detach(e, true).attach(Attachable.Method.create(clone)));
  }
make a deep clone of the graph elements that preserves ids
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/GraphHelper.java