You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/05/08 14:12:21 UTC

[1/9] incubator-tinkerpop git commit: Use the gryo serializer as generated by the Graph.io() method.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 08ee0fb24 -> 4700471cd


Use the gryo serializer as generated by the Graph.io() method.

If this isn't done the custom serializers do not get used and tests will fail for those graphs that need use such serializers.  We can never use the default io builders in tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/665ce51b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/665ce51b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/665ce51b

Branch: refs/heads/master
Commit: 665ce51ba2c6fb52130ecdf605a591933a81e810
Parents: 08ee0fb
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 8 07:57:44 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 8 07:57:44 2015 -0400

----------------------------------------------------------------------
 .../structure/util/star/StarGraphTest.java      | 101 ++++---------------
 1 file changed, 21 insertions(+), 80 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/665ce51b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
index 0ff2a82..0eab1cf 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
@@ -1,24 +1,21 @@
 /*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *  * Licensed to the Apache Software Foundation (ASF) under one
- *  * or more contributor license agreements.  See the NOTICE file
- *  * distributed with this work for additional information
- *  * regarding copyright ownership.  The ASF licenses this file
- *  * to you under the Apache License, Version 2.0 (the
- *  * "License"); you may not use this file except in compliance
- *  * with the License.  You may obtain a copy of the License at
- *  *
- *  * http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing,
- *  * software distributed under the License is distributed on an
- *  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  * KIND, either express or implied.  See the License for the
- *  * specific language governing permissions and limitations
- *  * under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
 package org.apache.tinkerpop.gremlin.structure.util.star;
 
 import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
@@ -32,13 +29,10 @@ import org.apache.tinkerpop.gremlin.structure.Property;
 import org.apache.tinkerpop.gremlin.structure.T;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoReader;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter;
+import org.apache.tinkerpop.gremlin.structure.io.IoCore;
 import org.apache.tinkerpop.gremlin.structure.util.Attachable;
-import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.javatuples.Pair;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import java.io.ByteArrayInputStream;
@@ -50,7 +44,6 @@ import java.util.Set;
 import java.util.UUID;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
@@ -79,7 +72,7 @@ public class StarGraphTest extends AbstractGremlinTest {
 
     @Test
     @LoadGraphWith(LoadGraphWith.GraphData.CREW)
-    public void originalAndStarVerticesShouldHaveTheSameTopology() {
+    public void shoudlValidateThatOriginalAndStarVerticesHaveTheSameTopology() {
         g.V().forEachRemaining(vertex -> TestHelper.validateEquality(vertex, StarGraph.of(vertex).getStarVertex()));
     }
 
@@ -91,7 +84,7 @@ public class StarGraphTest extends AbstractGremlinTest {
 
     @Test
     @LoadGraphWith(LoadGraphWith.GraphData.CREW)
-    public void testAttachableGetMethod() {
+    public void shouldAttacheWithGetMethod() {
         // vertex host
         g.V().forEachRemaining(vertex -> TestHelper.validateEquality(vertex, StarGraph.of(vertex).getStarVertex().attach(Attachable.Method.get(vertex))));
         g.V().forEachRemaining(vertex -> StarGraph.of(vertex).getStarVertex().properties().forEachRemaining(vertexProperty -> TestHelper.validateEquality(vertexProperty, ((Attachable<VertexProperty>) vertexProperty).attach(Attachable.Method.get(vertex)))));
@@ -117,7 +110,7 @@ public class StarGraphTest extends AbstractGremlinTest {
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
-    public void testAttachableCreateMethod() {
+    public void shoudlAttachWithCreateMethod() {
         final Random random = new Random(234335l);
         StarGraph starGraph = StarGraph.open();
         Vertex starVertex = starGraph.addVertex(T.label, "person", "name", "stephen", "name", "spmallete");
@@ -131,65 +124,13 @@ public class StarGraphTest extends AbstractGremlinTest {
         TestHelper.validateEquality(starVertex, createdVertex);
     }
 
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
-    public void shouldHaveSizeOfStarGraphLessThanDetached() throws Exception {
-        final Random random = new Random(95746498l);
-        final Vertex vertex = graph.addVertex("person");
-        for (int i = 0; i < 100; i++) { // vertex properties and meta properties
-            vertex.property(VertexProperty.Cardinality.list, UUID.randomUUID().toString(), random.nextDouble(),
-                    "acl", random.nextBoolean() ? "public" : "private",
-                    "created", random.nextLong());
-        }
-        for (int i = 0; i < 50000; i++) {  // edges and edge properties
-            vertex.addEdge("knows", graph.addVertex("person"), "since", random.nextLong(), "acl", random.nextBoolean() ? "public" : "private");
-            graph.addVertex("software").addEdge("createdBy", vertex, "date", random.nextLong());
-            graph.addVertex("group").addEdge("hasMember", vertex);
-        }
-        ///////////////
-        Pair<StarGraph, Integer> pair = serializeDeserialize(StarGraph.of(vertex));
-        int starGraphSize = pair.getValue1();
-        TestHelper.validateEquality(vertex, pair.getValue0().getStarVertex());
-        ///
-        pair = serializeDeserialize(pair.getValue0());
-        assertEquals(starGraphSize, pair.getValue1().intValue());
-        starGraphSize = pair.getValue1();
-        TestHelper.validateEquality(vertex, pair.getValue0().getStarVertex());
-        ///
-        pair = serializeDeserialize(pair.getValue0());
-        assertEquals(starGraphSize, pair.getValue1().intValue());
-        starGraphSize = pair.getValue1();
-        TestHelper.validateEquality(vertex, pair.getValue0().getStarVertex());
-        ///
-        // this is a rough approximation of "detached" serialization of all vertices and edges.
-        // now that writeVertex in gryo writes StarGraph that approach can't be used anymore to test
-        // serialization size of detached.
-        final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-        final GryoWriter writer = GryoWriter.build().create();
-        writer.writeObject(outputStream, DetachedFactory.detach(vertex, true));
-        vertex.edges(Direction.BOTH).forEachRemaining(e -> writer.writeObject(outputStream, DetachedFactory.detach(e, true)));
-        final int detachedVertexSize = outputStream.size();
-        assertTrue(starGraphSize < detachedVertexSize);
-
-        System.out.println("Size of star graph:        " + starGraphSize);
-        System.out.println("Size of detached vertex:   " + detachedVertexSize);
-        System.out.println("Size reduction:            " + (float) detachedVertexSize / (float) starGraphSize);
-    }
-
-    private static Pair<StarGraph, Integer> serializeDeserialize(final StarGraph starGraph) {
+    private Pair<StarGraph, Integer> serializeDeserialize(final StarGraph starGraph) {
         final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-        GryoWriter.build().create().writeObject(outputStream, starGraph);
         try {
-            return Pair.with(GryoReader.build().create().readObject(new ByteArrayInputStream(outputStream.toByteArray()), StarGraph.class), outputStream.size());
+            graph.io(IoCore.gryo()).writer().create().writeObject(outputStream, starGraph);
+            return Pair.with(graph.io(IoCore.gryo()).reader().create().readObject(new ByteArrayInputStream(outputStream.toByteArray()), StarGraph.class), outputStream.size());
         } catch (IOException ioe) {
             throw new RuntimeException(ioe);
         }
     }
-
-
 }


[2/9] incubator-tinkerpop git commit: Added structure "integration" tests to the test suite.

Posted by sp...@apache.org.
Added structure "integration" tests to the test suite.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/330363ab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/330363ab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/330363ab

Branch: refs/heads/master
Commit: 330363ab61a00264fe1534204f8b64c5ff900c23
Parents: 665ce51
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 8 07:59:42 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 8 07:59:42 2015 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/Graph.java      |   1 +
 .../structure/StructureIntegrateSuite.java      |  52 +++++++++
 .../gremlin/structure/io/IoIntegrateTest.java   | 107 +++++++++++++++++++
 .../tinkergraph/structure/TinkerGraph.java      |   1 +
 .../TinkerGraphStructureIntegrateTest.java      |  36 +++++++
 5 files changed, 197 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/330363ab/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index 6765524..1b514cc 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -1014,6 +1014,7 @@ public interface Graph extends AutoCloseable, Host {
     @Inherited
     public @interface OptIn {
         public static String SUITE_STRUCTURE_STANDARD = "org.apache.tinkerpop.gremlin.structure.StructureStandardSuite";
+        public static String SUITE_STRUCTURE_INTEGRATE = "org.apache.tinkerpop.gremlin.structure.StructureIntegrateSuite";
         public static String SUITE_STRUCTURE_PERFORMANCE = "org.apache.tinkerpop.gremlin.structure.StructurePerformanceSuite";
         public static String SUITE_PROCESS_COMPUTER = "org.apache.tinkerpop.gremlin.process.ProcessComputerSuite";
         public static String SUITE_PROCESS_STANDARD = "org.apache.tinkerpop.gremlin.process.ProcessStandardSuite";

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/330363ab/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureIntegrateSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureIntegrateSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureIntegrateSuite.java
new file mode 100644
index 0000000..e071f4a
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureIntegrateSuite.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.structure;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.structure.io.IoIntegrateTest;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * The {@code StructureIntegrationSuite} is a JUnit test runner that executes the Gremlin Test Suite over a
+ * {@link Graph} implementation. This suite contains "long-run" tests that enforce various behaviors and
+ * expectations of a vendor implementation of {@link Graph}. Its usage is optional to vendors as the tests are
+ * somewhat redundant to those found elsewhere in other required test suites.
+ * <p/>
+ * For more information on the usage of this suite, please see {@link StructureStandardSuite}.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class StructureIntegrateSuite extends AbstractGremlinSuite {
+
+    /**
+     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
+     * as needed to enforce tests upon implementations.
+     */
+    private static final Class<?>[] allTests = new Class<?>[]{
+            IoIntegrateTest.class
+    };
+
+    public StructureIntegrateSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+        super(klass, builder, allTests, null, false, TraversalEngine.Type.STANDARD);
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/330363ab/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoIntegrateTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoIntegrateTest.java
new file mode 100644
index 0000000..0026e67
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoIntegrateTest.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.structure.io;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
+import org.apache.tinkerpop.gremlin.FeatureRequirement;
+import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter;
+import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory;
+import org.apache.tinkerpop.gremlin.structure.util.star.StarGraph;
+import org.javatuples.Pair;
+import org.junit.Test;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.Random;
+import java.util.UUID;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class IoIntegrateTest extends AbstractGremlinTest {
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
+    public void shouldHaveSizeOfStarGraphLessThanDetached() throws Exception {
+        final Random random = new Random(95746498l);
+        final Vertex vertex = graph.addVertex("person");
+        for (int i = 0; i < 100; i++) { // vertex properties and meta properties
+            vertex.property(VertexProperty.Cardinality.list, UUID.randomUUID().toString(), random.nextDouble(),
+                    "acl", random.nextBoolean() ? "public" : "private",
+                    "created", random.nextLong());
+        }
+        for (int i = 0; i < 50000; i++) {  // edges and edge properties
+            vertex.addEdge("knows", graph.addVertex("person"), "since", random.nextLong(), "acl", random.nextBoolean() ? "public" : "private");
+            graph.addVertex("software").addEdge("createdBy", vertex, "date", random.nextLong());
+            graph.addVertex("group").addEdge("hasMember", vertex);
+        }
+        ///////////////
+        Pair<StarGraph, Integer> pair = serializeDeserialize(StarGraph.of(vertex));
+        int starGraphSize = pair.getValue1();
+        TestHelper.validateEquality(vertex, pair.getValue0().getStarVertex());
+        ///
+        pair = serializeDeserialize(pair.getValue0());
+        assertEquals(starGraphSize, pair.getValue1().intValue());
+        starGraphSize = pair.getValue1();
+        TestHelper.validateEquality(vertex, pair.getValue0().getStarVertex());
+        ///
+        pair = serializeDeserialize(pair.getValue0());
+        assertEquals(starGraphSize, pair.getValue1().intValue());
+        starGraphSize = pair.getValue1();
+        TestHelper.validateEquality(vertex, pair.getValue0().getStarVertex());
+        ///
+        // this is a rough approximation of "detached" serialization of all vertices and edges.
+        // now that writeVertex in gryo writes StarGraph that approach can't be used anymore to test
+        // serialization size of detached.
+        final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        final GryoWriter writer = graph.io(IoCore.gryo()).writer().create();
+        writer.writeObject(outputStream, DetachedFactory.detach(vertex, true));
+        vertex.edges(Direction.BOTH).forEachRemaining(e -> writer.writeObject(outputStream, DetachedFactory.detach(e, true)));
+        final int detachedVertexSize = outputStream.size();
+        assertTrue(starGraphSize < detachedVertexSize);
+
+        System.out.println("Size of star graph:        " + starGraphSize);
+        System.out.println("Size of detached vertex:   " + detachedVertexSize);
+        System.out.println("Size reduction:            " + (float) detachedVertexSize / (float) starGraphSize);
+    }
+
+    private Pair<StarGraph, Integer> serializeDeserialize(final StarGraph starGraph) {
+        final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        try {
+            graph.io(IoCore.gryo()).writer().create().writeObject(outputStream, starGraph);
+            return Pair.with(graph.io(IoCore.gryo()).reader().create().readObject(new ByteArrayInputStream(outputStream.toByteArray()), StarGraph.class), outputStream.size());
+        } catch (IOException ioe) {
+            throw new RuntimeException(ioe);
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/330363ab/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index e9058a8..cfe7f73 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -53,6 +53,7 @@ import java.util.stream.Stream;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 @Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_INTEGRATE)
 @Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_PERFORMANCE)
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
 @Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/330363ab/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructureIntegrateTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructureIntegrateTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructureIntegrateTest.java
new file mode 100644
index 0000000..04d93e0
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphStructureIntegrateTest.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.tinkergraph.structure;
+
+import org.apache.tinkerpop.gremlin.structure.StructureIntegrateSuite;
+import org.apache.tinkerpop.gremlin.structure.StructurePerformanceSuite;
+import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
+import org.junit.runner.RunWith;
+
+/**
+ * Executes the Gremlin Structure Performance Test Suite using TinkerGraph.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(StructureIntegrateSuite.class)
+@StructureIntegrateSuite.GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphStructureIntegrateTest {
+
+}
\ No newline at end of file


[9/9] incubator-tinkerpop git commit: Move IoTest to io package with its associated integration test.

Posted by sp...@apache.org.
Move IoTest to io package with its associated integration test.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/4700471c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/4700471c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/4700471c

Branch: refs/heads/master
Commit: 4700471cd5cc33a43ea36de9e69909dcf3ef887b
Parents: 9f669ac
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 8 08:07:16 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 8 08:07:16 2015 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/GraphTest.java  |    1 +
 .../tinkerpop/gremlin/structure/IoTest.java     | 2457 -----------------
 .../structure/StructureStandardSuite.java       |    1 +
 .../tinkerpop/gremlin/structure/VertexTest.java |    1 +
 .../tinkerpop/gremlin/structure/io/IoTest.java  | 2462 ++++++++++++++++++
 .../tinkergraph/TinkerGraphProvider.java        |    2 +-
 6 files changed, 2466 insertions(+), 2458 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4700471c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
index dfbf6f4..f2ee8e8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/GraphTest.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.FeatureRequirement;
 import org.apache.tinkerpop.gremlin.FeatureRequirementSet;
 import org.apache.tinkerpop.gremlin.GraphManager;
 import org.apache.tinkerpop.gremlin.GraphProvider;
+import org.apache.tinkerpop.gremlin.structure.io.IoTest;
 import org.apache.tinkerpop.gremlin.util.StreamFactory;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.junit.Test;


[5/9] incubator-tinkerpop git commit: Move IoTest to io package with its associated integration test.

Posted by sp...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4700471c/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
index b2f2e0a..dd53dde 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java
@@ -23,7 +23,7 @@ import org.apache.tinkerpop.gremlin.AbstractGraphProvider;
 import org.apache.tinkerpop.gremlin.LoadGraphWith;
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.GraphTest;
-import org.apache.tinkerpop.gremlin.structure.IoTest;
+import org.apache.tinkerpop.gremlin.structure.io.IoTest;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerEdge;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerElement;
 import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;


[3/9] incubator-tinkerpop git commit: Fix test name mispellings.

Posted by sp...@apache.org.
Fix test name mispellings.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/7dfc757d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/7dfc757d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/7dfc757d

Branch: refs/heads/master
Commit: 7dfc757d17804202567d7800b25361889e9cfda2
Parents: 330363ab
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 8 08:06:31 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 8 08:06:31 2015 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/structure/util/star/StarGraphTest.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/7dfc757d/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
index 0eab1cf..bf154f4 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/util/star/StarGraphTest.java
@@ -72,7 +72,7 @@ public class StarGraphTest extends AbstractGremlinTest {
 
     @Test
     @LoadGraphWith(LoadGraphWith.GraphData.CREW)
-    public void shoudlValidateThatOriginalAndStarVerticesHaveTheSameTopology() {
+    public void shouldValidateThatOriginalAndStarVerticesHaveTheSameTopology() {
         g.V().forEachRemaining(vertex -> TestHelper.validateEquality(vertex, StarGraph.of(vertex).getStarVertex()));
     }
 
@@ -84,7 +84,7 @@ public class StarGraphTest extends AbstractGremlinTest {
 
     @Test
     @LoadGraphWith(LoadGraphWith.GraphData.CREW)
-    public void shouldAttacheWithGetMethod() {
+    public void shouldAttachWithGetMethod() {
         // vertex host
         g.V().forEachRemaining(vertex -> TestHelper.validateEquality(vertex, StarGraph.of(vertex).getStarVertex().attach(Attachable.Method.get(vertex))));
         g.V().forEachRemaining(vertex -> StarGraph.of(vertex).getStarVertex().properties().forEachRemaining(vertexProperty -> TestHelper.validateEquality(vertexProperty, ((Attachable<VertexProperty>) vertexProperty).attach(Attachable.Method.get(vertex)))));
@@ -110,7 +110,7 @@ public class StarGraphTest extends AbstractGremlinTest {
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
     @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_PROPERTY)
-    public void shoudlAttachWithCreateMethod() {
+    public void shouldAttachWithCreateMethod() {
         final Random random = new Random(234335l);
         StarGraph starGraph = StarGraph.open();
         Vertex starVertex = starGraph.addVertex(T.label, "person", "name", "stephen", "name", "spmallete");


[7/9] incubator-tinkerpop git commit: Move IoTest to io package with its associated integration test.

Posted by sp...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4700471c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
index 4625bc7..2f452a0 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
@@ -23,6 +23,7 @@ import org.apache.tinkerpop.gremlin.GraphProvider;
 import org.apache.tinkerpop.gremlin.algorithm.generator.CommunityGeneratorTest;
 import org.apache.tinkerpop.gremlin.algorithm.generator.DistributionGeneratorTest;
 import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.structure.io.IoTest;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedEdgeTest;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedGraphTest;
 import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedPropertyTest;

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4700471c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
index 9e41b47..6e7b02b 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/VertexTest.java
@@ -25,6 +25,7 @@ import org.apache.tinkerpop.gremlin.FeatureRequirementSet;
 import org.apache.tinkerpop.gremlin.GraphManager;
 import org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures;
 import org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures;
+import org.apache.tinkerpop.gremlin.structure.io.IoTest;
 import org.apache.tinkerpop.gremlin.structure.util.StringFactory;
 import org.apache.tinkerpop.gremlin.util.function.FunctionUtils;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;


[6/9] incubator-tinkerpop git commit: Move IoTest to io package with its associated integration test.

Posted by sp...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4700471c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
new file mode 100644
index 0000000..7a91a7f
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
@@ -0,0 +1,2462 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.structure.io;
+
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import org.apache.commons.configuration.Configuration;
+import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
+import org.apache.tinkerpop.gremlin.FeatureRequirement;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.TestHelper;
+import org.apache.tinkerpop.gremlin.structure.Direction;
+import org.apache.tinkerpop.gremlin.structure.Edge;
+import org.apache.tinkerpop.gremlin.structure.Element;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures;
+import org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures;
+import org.apache.tinkerpop.gremlin.structure.P;
+import org.apache.tinkerpop.gremlin.structure.Property;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLIo;
+import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLReader;
+import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLResourceAccess;
+import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLWriter;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONResourceAccess;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTokens;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.LegacyGraphSONReader;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoReader;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter;
+import org.apache.tinkerpop.gremlin.structure.io.gryo.VertexByteArrayInputStream;
+import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory;
+import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
+import org.apache.tinkerpop.gremlin.util.StreamFactory;
+import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
+import org.junit.Before;
+import org.junit.Test;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.Source;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static org.apache.tinkerpop.gremlin.structure.Graph.Features.ElementFeatures.FEATURE_ANY_IDS;
+import static org.apache.tinkerpop.gremlin.structure.Graph.Features.VariableFeatures.FEATURE_VARIABLES;
+import static org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS;
+import static org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures.*;
+import static org.apache.tinkerpop.gremlin.structure.io.IoCore.graphml;
+import static org.apache.tinkerpop.gremlin.structure.io.IoCore.graphson;
+import static org.apache.tinkerpop.gremlin.structure.io.IoCore.gryo;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+
+/**
+ * @author Joshua Shinavier (http://fortytwo.net)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ */
+public class IoTest extends AbstractGremlinTest {
+
+    private Io.Builder<GraphMLIo> graphml;
+    private Io.Builder<GraphSONIo> graphson;
+    private Io.Builder<GryoIo> gryo;
+
+    @Before
+    public void setupBeforeEachTest() {
+        graphml = graphml();
+        graphson = graphson();
+        gryo = gryo();
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    public void shouldReadGraphML() throws IOException {
+        readGraphMLIntoGraph(graph, "tinkerpop-classic.xml");
+        assertClassicGraph(graph, false, true);
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    public void shouldReadGraphMLUnorderedElements() throws IOException {
+        readGraphMLIntoGraph(graph, "tinkerpop-classic-unordered.xml");
+        assertClassicGraph(graph, false, true);
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_BOOLEAN_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_LONG_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_DOUBLE_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    public void shouldReadGraphMLAnAllSupportedDataTypes() throws IOException {
+        final GraphReader reader = GraphMLReader.build().create();
+        try (final InputStream stream = IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "graph-types.xml")) {
+            reader.readGraph(stream, graph);
+        }
+
+        final Vertex v = graph.vertices().next();
+        assertEquals(123.45d, v.value("d"), 0.000001d);
+        assertEquals("some-string", v.<String>value("s"));
+        assertEquals(29, v.<Integer>value("i").intValue());
+        assertEquals(true, v.<Boolean>value("b"));
+        assertEquals(123.54f, v.value("f"), 0.000001f);
+        assertEquals(10000000l, v.<Long>value("l").longValue());
+        assertEquals("junk", v.<String>value("n"));
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteClassicToGraphMLToFileWithHelpers() throws Exception {
+        final File f = TestHelper.generateTempFile(this.getClass(), name.getMethodName(), ".xml");
+        try {
+            graph.io(graphml).writeGraph(f.getAbsolutePath());
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CLASSIC);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            g1.io(graphml).readGraph(f.getAbsolutePath());
+
+            assertClassicGraph(graph, false, true);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        } catch (Exception ex) {
+            f.delete();
+            throw ex;
+        }
+    }
+
+    /**
+     * Only need to execute this test with TinkerGraph or other graphs that support user supplied identifiers.
+     */
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    public void shouldWriteNormalizedGraphML() throws Exception {
+        try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
+            final GraphMLWriter w = GraphMLWriter.build().normalize(true).create();
+            w.writeGraph(bos, graph);
+
+            final String expected = streamToString(IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "tinkerpop-classic-normalized.xml"));
+            assertEquals(expected.replace("\n", "").replace("\r", ""), bos.toString().replace("\n", "").replace("\r", ""));
+        }
+    }
+
+    /**
+     * Only need to execute this test with TinkerGraph or other graphs that support user supplied identifiers.
+     */
+    @Test
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VariableFeatures.class, feature = FEATURE_VARIABLES)
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    public void shouldWriteNormalizedGraphSON() throws Exception {
+        try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
+            final GraphSONMapper mapper = graph.io(graphson).mapper().normalize(true).create();
+            final GraphSONWriter w = graph.io(graphson).writer().mapper(mapper).create();
+            w.writeGraph(bos, graph);
+
+            final String expected = streamToString(IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphSONResourceAccess.class) + "tinkerpop-classic-normalized.json"));
+            assertEquals(expected.replace("\n", "").replace("\r", ""), bos.toString().replace("\n", "").replace("\r", ""));
+        }
+    }
+
+    /**
+     * Note: this is only a very lightweight test of writer/reader encoding. It is known that there are characters
+     * which, when written by GraphMLWriter, cause parse errors for GraphMLReader. However, this happens uncommonly
+     * enough that is not yet known which characters those are. Only need to execute this test with TinkerGraph
+     * or other graphs that support user supplied identifiers.
+     */
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_STRING_IDS)
+    public void shouldProperlyEncodeWithGraphML() throws Exception {
+        final Vertex v = graph.addVertex(T.id, "1");
+        v.property(VertexProperty.Cardinality.single, "text", "\u00E9");
+
+        final GraphMLWriter w = GraphMLWriter.build().create();
+
+        final File f = TestHelper.generateTempFile(this.getClass(), "test", ".txt");
+        try (final OutputStream out = new FileOutputStream(f)) {
+            w.writeGraph(out, graph);
+        }
+
+        validateXmlAgainstGraphMLXsd(f);
+
+        // reusing the same config used for creation of "g".
+        final Configuration configuration = graphProvider.newGraphConfiguration("g2", this.getClass(), name.getMethodName(), null);
+        graphProvider.clear(configuration);
+        final Graph g2 = graphProvider.openTestGraph(configuration);
+        final GraphMLReader r = GraphMLReader.build().create();
+
+        try (final InputStream in = new FileInputStream(f)) {
+            r.readGraph(in, g2);
+        }
+
+        final Vertex v2 = g2.vertices("1").next();
+        assertEquals("\u00E9", v2.property("text").value());
+
+        // need to manually close the "g2" instance
+        graphProvider.clear(g2, configuration);
+    }
+
+    /**
+     * This is just a serialization check.
+     */
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_ANY_IDS)
+    public void shouldProperlySerializeCustomIdWithGraphSON() throws Exception {
+        final UUID id = UUID.fromString("AF4B5965-B176-4552-B3C1-FBBE2F52C305");
+        graph.addVertex(T.id, new CustomId("vertex", id));
+
+        final SimpleModule module = new SimpleModule();
+        module.addSerializer(CustomId.class, new CustomId.CustomIdJacksonSerializer());
+        final GraphWriter writer = graph.io(graphson).writer().mapper(
+                graph.io(graphson).mapper().addCustomModule(module).embedTypes(true).create()).create();
+
+        try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
+            writer.writeGraph(baos, graph);
+
+            final JsonNode jsonGraph = new ObjectMapper().readTree(baos.toByteArray());
+            final JsonNode idValue = jsonGraph.get(GraphSONTokens.ID);
+            assertTrue(idValue.has("cluster"));
+            assertEquals("vertex", idValue.get("cluster").asText());
+            assertTrue(idValue.has("elementId"));
+            assertEquals("AF4B5965-B176-4552-B3C1-FBBE2F52C305".toLowerCase(), idValue.get("elementId").asText());
+
+            // reusing the same config used for creation of "g".
+            final Configuration configuration = graphProvider.newGraphConfiguration("g2", this.getClass(), name.getMethodName(), null);
+            graphProvider.clear(configuration);
+            final Graph g2 = graphProvider.openTestGraph(configuration);
+
+            try (final InputStream is = new ByteArrayInputStream(baos.toByteArray())) {
+                final GraphReader reader = graph.io(graphson).reader()
+                        .mapper(graph.io(graphson).mapper().embedTypes(true).addCustomModule(module).create()).create();
+                reader.readGraph(is, g2);
+            }
+
+            final Vertex v2 = g2.vertices().next();
+            final CustomId customId = (CustomId) v2.id();
+            assertEquals(id, customId.getElementId());
+            assertEquals("vertex", customId.getCluster());
+
+            // need to manually close the "g2" instance
+            graphProvider.clear(g2, configuration);
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_ANY_IDS)
+    public void shouldProperlySerializeCustomIdWithGryo() throws Exception {
+        graph.addVertex(T.id, new CustomId("vertex", UUID.fromString("AF4B5965-B176-4552-B3C1-FBBE2F52C305")));
+        final GryoMapper gryo = GryoMapper.build().addCustom(CustomId.class).create();
+
+        final GryoWriter writer = GryoWriter.build().mapper(gryo).create();
+        final GryoReader reader = GryoReader.build().mapper(gryo).create();
+
+        final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), null);
+        graphProvider.clear(configuration);
+        final Graph g1 = graphProvider.openTestGraph(configuration);
+
+        GraphMigrator.migrateGraph(graph, g1, reader, writer);
+
+        final Vertex onlyVertex = g1.traversal().V().next();
+        final CustomId id = (CustomId) onlyVertex.id();
+        assertEquals("vertex", id.getCluster());
+        assertEquals(UUID.fromString("AF4B5965-B176-4552-B3C1-FBBE2F52C305"), id.getElementId());
+
+        // need to manually close the "g1" instance
+        graphProvider.clear(g1, configuration);
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldMigrateGraphWithFloat() throws Exception {
+        final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), null);
+        graphProvider.clear(configuration);
+        final Graph g1 = graphProvider.openTestGraph(configuration);
+
+        final GryoReader reader = graph.io(gryo).reader().create();
+        final GryoWriter writer = graph.io(gryo).writer().create();
+
+        GraphMigrator.migrateGraph(graph, g1, reader, writer);
+
+        assertClassicGraph(g1, false, false);
+
+        // need to manually close the "g1" instance
+        graphProvider.clear(g1, configuration);
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldMigrateGraph() throws Exception {
+        final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
+        graphProvider.clear(configuration);
+        final Graph g1 = graphProvider.openTestGraph(configuration);
+
+        final GryoReader reader = graph.io(gryo).reader().create();
+        final GryoWriter writer = graph.io(gryo).writer().create();
+
+        GraphMigrator.migrateGraph(graph, g1, reader, writer);
+
+        // by making this lossy for float it will assert floats for doubles
+        assertModernGraph(g1, true, false);
+
+        // need to manually close the "g1" instance
+        graphProvider.clear(g1, configuration);
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteModernToGryo() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeGraph(os, graph);
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
+            graphProvider.clear(configuration);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            final byte[] x = os.toByteArray();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(x)) {
+                reader.readGraph(bais, g1);
+            }
+
+            // by making this lossy for float it will assert floats for doubles
+            assertModernGraph(g1, true, false);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteModernToGryoToFileWithHelpers() throws Exception {
+        final File f = TestHelper.generateTempFile(this.getClass(), name.getMethodName(), ".kryo");
+        try {
+            graph.io(gryo).writeGraph(f.getAbsolutePath());
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            g1.io(gryo).readGraph(f.getAbsolutePath());
+
+            // by making this lossy for float it will assert floats for doubles
+            assertModernGraph(g1, true, false);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        } catch (Exception ex) {
+            f.delete();
+            throw ex;
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CREW)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteCrewToGryo() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeGraph(os, graph);
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CREW);
+            graphProvider.clear(configuration);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            final GryoReader reader = GryoReader.build()
+                    .mapper(graph.io(gryo).mapper().create()).create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readGraph(bais, g1);
+            }
+
+            // by making this lossy for float it will assert floats for doubles
+            assertCrewGraph(g1, false);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        }
+    }
+
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteClassicToGryo() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeGraph(os, graph);
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CLASSIC);
+            graphProvider.clear(configuration);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readGraph(bais, g1);
+            }
+
+            assertClassicGraph(g1, false, false);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteClassicToGraphSON() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeGraph(os, graph);
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CLASSIC);
+            graphProvider.clear(configuration);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readGraph(bais, g1);
+            }
+
+            assertClassicGraph(g1, true, false);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteModernToGraphSON() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeGraph(os, graph);
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
+            graphProvider.clear(configuration);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readGraph(bais, g1);
+            }
+
+            assertModernGraph(g1, true, false);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteModernToGraphSONWithHelpers() throws Exception {
+        final File f = TestHelper.generateTempFile(this.getClass(), name.getMethodName(), ".json");
+        try {
+            graph.io(graphson).writeGraph(f.getAbsolutePath());
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
+            graphProvider.clear(configuration);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            g1.io(graphson).readGraph(f.getAbsolutePath());
+
+            assertModernGraph(g1, true, false);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        } catch (Exception ex) {
+            f.delete();
+            throw ex;
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CREW)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    public void shouldReadWriteCrewToGraphSON() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeGraph(os, graph);
+
+            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CREW);
+            graphProvider.clear(configuration);
+            final Graph g1 = graphProvider.openTestGraph(configuration);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readGraph(bais, g1);
+            }
+
+            assertCrewGraph(g1, true);
+
+            // need to manually close the "g1" instance
+            graphProvider.clear(g1, configuration);
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    public void shouldReadWriteEdgeToGryoUsingFloatProperty() throws Exception {
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw");
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), detachedEdge.id());
+                    assertEquals(v1.id(), detachedEdge.outVertex().id());
+                    assertEquals(v2.id(), detachedEdge.inVertex().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(0.5f, detachedEdge.properties("weight").next().value());
+                    assertEquals("rw", detachedEdge.properties("acl").next().value());
+
+                    called.set(true);
+
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteEdgeToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v1.addEdge("friend", v2, "weight", 0.5d, "acl", "rw");
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), detachedEdge.id());
+                    assertEquals(v1.id(), detachedEdge.outVertex().id());
+                    assertEquals(v2.id(), detachedEdge.inVertex().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(0.5d, e.properties("weight").next().value());
+                    assertEquals("rw", e.properties("acl").next().value());
+                    called.set(true);
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedEdgeAsReferenceToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5d, "acl", "rw"), false);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), detachedEdge.id());
+                    assertEquals(v1.id(), detachedEdge.outVertex().id());
+                    assertEquals(v2.id(), detachedEdge.inVertex().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
+                    called.set(true);
+
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedEdgeToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5d, "acl", "rw"), true);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), detachedEdge.id());
+                    assertEquals(v1.id(), detachedEdge.outVertex().id());
+                    assertEquals(v2.id(), detachedEdge.inVertex().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(0.5d, detachedEdge.properties("weight").next().value());
+                    assertEquals("rw", detachedEdge.properties("acl").next().value());
+                    called.set(true);
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteEdgeToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw");
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
+                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
+                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(0.5d, detachedEdge.properties("weight").next().value());
+                    assertEquals("rw", detachedEdge.properties("acl").next().value());
+                    called.set(true);
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedEdgeAsReferenceToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw"), false);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
+                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
+                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
+                    called.set(true);
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedEdgeToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw"), true);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
+                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
+                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(0.5d, detachedEdge.properties("weight").next().value());
+                    assertEquals("rw", detachedEdge.properties("acl").next().value());
+                    called.set(true);
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
+    public void shouldReadWriteEdgeToGraphSONNonLossy() throws Exception {
+        final Vertex v1 = graph.addVertex(T.id, 1l, T.label, "person");
+        final Vertex v2 = graph.addVertex(T.id, 2l, T.label, "person");
+        final Edge e = v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw");
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), detachedEdge.id());
+                    assertEquals(v1.id(), detachedEdge.outVertex().id());
+                    assertEquals(v2.id(), detachedEdge.inVertex().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(0.5f, detachedEdge.properties("weight").next().value());
+                    assertEquals("rw", detachedEdge.properties("acl").next().value());
+                    called.set(true);
+
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_SERIALIZABLE_VALUES)
+    public void shouldSupportUUIDInGraphSON() throws Exception {
+        final UUID id = UUID.randomUUID();
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v1.addEdge("friend", v2, "uuid", id);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    // a quick reminder here that the purpose of these id assertions is to ensure that those with
+                    // complex ids that are not simply toString'd (i.e. are complex objects in JSON as well)
+                    // properly respond to filtering in Graph.edges/vertices
+                    assertEquals(e.id(), graph.edges(detachedEdge.id()).next().id());
+                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id()).next().id());
+                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id()).next().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
+                    assertEquals(id, detachedEdge.value("uuid"));
+
+                    called.set(true);
+
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_SERIALIZABLE_VALUES)
+    public void shouldSupportUUIDInGryo() throws Exception {
+        final UUID id = UUID.randomUUID();
+        final Vertex v1 = graph.addVertex(T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v1.addEdge("friend", v2, "uuid", id);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeEdge(os, e);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readEdge(bais, edge -> {
+                    final Edge detachedEdge = (Edge) edge;
+                    assertEquals(e.id(), detachedEdge.id());
+                    assertEquals(v1.id(), detachedEdge.outVertex().id());
+                    assertEquals(v2.id(), detachedEdge.inVertex().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(v2.label(), detachedEdge.inVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
+                    assertEquals(id, detachedEdge.value("uuid"));
+
+                    called.set(true);
+
+                    return null;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    public void shouldReadWriteVertexNoEdgesToGryoUsingFloatProperty() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
+
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5f);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeVertex(os, v1);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), detachedVertex.id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals(v1.value("name"), detachedVertex.value("name").toString());
+                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
+                    called.set(true);
+                    return mock(Vertex.class);
+                });
+            }
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteVertexNoEdgesToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5d);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeVertex(os, v1);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), detachedVertex.id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals(v1.value("name"), detachedVertex.value("name").toString());
+                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
+                    called.set(true);
+                    return mock(Vertex.class);
+                });
+            }
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedVertexNoEdgesToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5d);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            final DetachedVertex dv = DetachedFactory.detach(v1, true);
+            writer.writeVertex(os, dv);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), detachedVertex.id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals("marko", detachedVertex.properties("name").next().value());
+                    assertEquals("rw", detachedVertex.properties("acl").next().value());
+                    called.set(true);
+                    return mock(Vertex.class);
+                });
+            }
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedVertexAsReferenceNoEdgesToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5d);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            final DetachedVertex dv = DetachedFactory.detach(v1, false);
+            writer.writeVertex(os, dv);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), detachedVertex.id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(0, IteratorUtils.count(detachedVertex.properties()));
+                    called.set(true);
+                    return mock(Vertex.class);
+                });
+            }
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
+    public void shouldReadWriteVertexMultiPropsNoEdgesToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "name", "mark", "acl", "rw");
+        v1.property(VertexProperty.Cardinality.single, "propsSquared", 123, "x", "a", "y", "b");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5d);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeVertex(os, v1);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), detachedVertex.id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(4, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals("a", detachedVertex.property("propsSquared").value("x"));
+                    assertEquals("b", detachedVertex.property("propsSquared").value("y"));
+                    assertEquals(2, IteratorUtils.count(detachedVertex.properties("name")));
+                    assertTrue(StreamFactory.stream(detachedVertex.properties("name")).allMatch(p -> p.key().equals("name") && (p.value().equals("marko") || p.value().equals("mark"))));
+                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
+                    called.set(true);
+                    return mock(Vertex.class);
+                });
+            }
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteVertexNoEdgesToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5f);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeVertex(os, v1);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals("marko", detachedVertex.properties("name").next().value());
+                    assertEquals("rw", detachedVertex.properties("acl").next().value());
+                    called.set(true);
+                    return detachedVertex;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedVertexNoEdgesToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5f);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            final DetachedVertex dv = DetachedFactory.detach(v1, true);
+            writer.writeVertex(os, dv);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals("marko", detachedVertex.properties("name").next().value());
+                    assertEquals("rw", detachedVertex.properties("acl").next().value());
+                    called.set(true);
+                    return detachedVertex;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteDetachedVertexAsReferenceNoEdgesToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5f);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            final DetachedVertex dv = DetachedFactory.detach(v1, false);
+            writer.writeVertex(os, dv);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(0, IteratorUtils.count(detachedVertex.properties()));
+
+                    called.set(true);
+                    return detachedVertex;
+                });
+            }
+
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
+    public void shouldReadWriteVertexMultiPropsNoEdgesToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", "name", "mark", "acl", "rw");
+        v1.property(VertexProperty.Cardinality.single, "propsSquared", 123, "x", "a", "y", "b");
+        final Vertex v2 = graph.addVertex();
+        v1.addEdge("friends", v2, "weight", 0.5d);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeVertex(os, v1);
+
+            final AtomicBoolean called = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(4, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals("a", detachedVertex.property("propsSquared").value("x"));
+                    assertEquals("b", detachedVertex.property("propsSquared").value("y"));
+                    assertEquals(2, IteratorUtils.count(detachedVertex.properties("name")));
+                    assertTrue(StreamFactory.stream(detachedVertex.properties("name")).allMatch(p -> p.key().equals("name") && (p.value().equals("marko") || p.value().equals("mark"))));
+                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
+                    called.set(true);
+                    return mock(Vertex.class);
+                });
+            }
+            assertTrue(called.get());
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    public void shouldReadWriteVerticesNoEdgesToGryoManual() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeVertices(os, g.V().has("age", P.gt(30)));
+
+            final AtomicInteger called = new AtomicInteger(0);
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final VertexByteArrayInputStream vbais = new VertexByteArrayInputStream(new ByteArrayInputStream(os.toByteArray()))) {
+                final byte[] y = vbais.readVertexBytes().toByteArray();
+                reader.readVertex(new ByteArrayInputStream(y),
+                        attachable -> {
+                            final Vertex detachedVertex = attachable.get();
+                            called.incrementAndGet();
+                            return detachedVertex;
+                        });
+
+                final byte[] z = vbais.readVertexBytes().toByteArray();
+                reader.readVertex(new ByteArrayInputStream(z),
+                        attachable -> {
+                            final Vertex detachedVertex = attachable.get();
+                            called.incrementAndGet();
+                            return detachedVertex;
+                        });
+            }
+
+            assertEquals(2, called.get());
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+    public void shouldReadWriteVerticesNoEdgesToGryo() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeVertices(os, g.V().has("age", P.gt(30)));
+
+            final AtomicInteger called = new AtomicInteger(0);
+            final GryoReader reader = graph.io(gryo).reader().create();
+
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                final Iterator<Vertex> itty = reader.readVertices(bais,
+                        attachable -> {
+                            final Vertex detachedVertex = attachable.get();
+                            called.incrementAndGet();
+                            return detachedVertex;
+                        }, null, null);
+
+                assertNotNull(itty.next());
+                assertNotNull(itty.next());
+                assertFalse(itty.hasNext());
+            }
+
+            assertEquals(2, called.get());
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
+    public void shouldReadWriteVerticesNoEdgesToGraphSON() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeVertices(os, g.V().has("age", P.gt(30)));
+
+            final AtomicInteger called = new AtomicInteger(0);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                final Iterator<Vertex> itty = reader.readVertices(bais,
+                        attachable -> {
+                            final Vertex detachedVertex = attachable.get();
+                            called.incrementAndGet();
+                            return detachedVertex;
+                        }, null, null);
+
+                assertNotNull(itty.next());
+                assertNotNull(itty.next());
+                assertFalse(itty.hasNext());
+            }
+
+            assertEquals(2, called.get());
+        }
+    }
+
+    @Test
+    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
+    public void shouldReadWriteVerticesNoEdgesToGraphSONManual() throws Exception {
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeVertices(os, g.V().has("age", P.gt(30)));
+
+            final AtomicInteger called = new AtomicInteger(0);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            final BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(os.toByteArray())));
+            String line = br.readLine();
+            reader.readVertex(new ByteArrayInputStream(line.getBytes()),
+                    attachable -> {
+                        called.incrementAndGet();
+                        return mock(Vertex.class);
+                    });
+
+            line = br.readLine();
+            reader.readVertex(new ByteArrayInputStream(line.getBytes()),
+                    detachedVertex -> {
+                        called.incrementAndGet();
+                        return mock(Vertex.class);
+                    });
+
+            assertEquals(2, called.get());
+        }
+    }
+
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteVertexWithOUTEdgesToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", T.label, "person");
+
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v1.addEdge("friends", v2, "weight", 0.5d);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeVertex(os, v1, Direction.OUT);
+
+            final AtomicBoolean calledVertex = new AtomicBoolean(false);
+            final AtomicBoolean calledEdge = new AtomicBoolean(false);
+            final GryoReader reader = graph.io(gryo).reader().create();
+
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                            final Vertex detachedVertex = attachable.get();
+                            TestHelper.validateVertexEquality(v1, detachedVertex, true);
+                            calledVertex.set(true);
+                            return detachedVertex;
+                        },
+                        attachable -> {
+                            final Edge detachedEdge = attachable.get();
+                            TestHelper.validateEdgeEquality(e, detachedEdge);
+                            calledEdge.set(true);
+
+                            return detachedEdge;
+                        }, Direction.OUT);
+            }
+
+            assertTrue(calledVertex.get());
+            assertTrue(calledEdge.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteVertexWithOUTEdgesToGraphSON() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", T.label, "person");
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v1.addEdge("friends", v2, "weight", 0.5f);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GraphSONWriter writer = graph.io(graphson).writer().create();
+            writer.writeVertex(os, v1, Direction.OUT);
+
+            final AtomicBoolean calledVertex = new AtomicBoolean(false);
+            final AtomicBoolean calledEdge = new AtomicBoolean(false);
+            final GraphSONReader reader = graph.io(graphson).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
+                    assertEquals(v1.label(), detachedVertex.label());
+                    assertEquals(1, IteratorUtils.count(detachedVertex.properties()));
+                    assertEquals("marko", detachedVertex.value("name"));
+                    calledVertex.set(true);
+                    return null;
+                }, attachable -> {
+                    final Edge detachedEdge = attachable.get();
+                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
+                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
+                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
+                    assertEquals(v1.label(), detachedEdge.outVertex().label());
+                    assertEquals(e.label(), detachedEdge.label());
+                    assertEquals(1, IteratorUtils.count(detachedEdge.properties()));
+                    assertEquals(0.5d, detachedEdge.value("weight"), 0.000001d);                      // lossy
+
+                    calledEdge.set(true);
+                    return null;
+                }, Direction.OUT);
+            }
+
+            assertTrue(calledVertex.get());
+            assertTrue(calledEdge.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteVertexWithINEdgesToGryo() throws Exception {
+        final Vertex v1 = graph.addVertex("name", "marko", T.label, "person");
+
+        final Vertex v2 = graph.addVertex(T.label, "person");
+        final Edge e = v2.addEdge("friends", v1, "weight", 0.5d);
+
+        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            final GryoWriter writer = graph.io(gryo).writer().create();
+            writer.writeVertex(os, v1, Direction.IN);
+
+            final AtomicBoolean calledVertex = new AtomicBoolean(false);
+            final AtomicBoolean calledEdge = new AtomicBoolean(false);
+
+            final GryoReader reader = graph.io(gryo).reader().create();
+            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
+                reader.readVertex(bais, attachable -> {
+                    final Vertex detachedVertex = attachable.get();
+                    TestHelper.validateVertexEquality(v1, detachedVertex, true);
+                    calledVertex.set(true);
+                    return detachedVertex;
+                }, attachable -> {
+                    final Edge detachedEdge = attachable.get();
+                    TestHelper.validateEdgeEquality(e, detachedEdge);
+                    calledEdge.set(true);
+
+                    return detachedEdge;
+                }, Direction.IN);
+            }
+
+            assertTrue(calledVertex.get());
+            assertTrue(calledEdge.get());
+        }
+    }
+
+    @Test
+    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
+    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
+    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
+    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
+    public void shouldReadWriteVertexWithINEdgesToGraphSON() throws Exception {
+        final

<TRUNCATED>


[4/9] incubator-tinkerpop git commit: Enforce order of edges in testing equality.

Posted by sp...@apache.org.
Enforce order of edges in testing equality.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9f669ac3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9f669ac3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9f669ac3

Branch: refs/heads/master
Commit: 9f669ac3ea558a559d3d106fccc046b2d7fe2683
Parents: 7dfc757
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 8 08:07:01 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 8 08:07:01 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/tinkerpop/gremlin/TestHelper.java     | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9f669ac3/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/TestHelper.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/TestHelper.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/TestHelper.java
index 5a2ab36..7a43de5 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/TestHelper.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/TestHelper.java
@@ -24,6 +24,7 @@ import org.apache.tinkerpop.gremlin.structure.Property;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
 import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLResourceAccess;
+import org.apache.tinkerpop.gremlin.structure.util.Comparators;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 
 import java.io.File;
@@ -31,6 +32,7 @@ import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.util.Comparator;
 import java.util.Iterator;
 import java.util.List;
 
@@ -130,15 +132,15 @@ public final class TestHelper {
             }
         }
         if (testEdges) {
-            Iterator<Edge> originalEdges = IteratorUtils.set(originalVertex.edges(Direction.OUT)).iterator();
-            Iterator<Edge> otherEdges = IteratorUtils.set(otherVertex.edges(Direction.OUT)).iterator();
+            Iterator<Edge> originalEdges = IteratorUtils.list(originalVertex.edges(Direction.OUT), Comparators.ELEMENT_COMPARATOR).iterator();
+            Iterator<Edge> otherEdges = IteratorUtils.list(otherVertex.edges(Direction.OUT), Comparators.ELEMENT_COMPARATOR).iterator();
             while (originalEdges.hasNext()) {
                 validateEdgeEquality(originalEdges.next(), otherEdges.next());
             }
             assertFalse(otherEdges.hasNext());
 
-            originalEdges = IteratorUtils.set(originalVertex.edges(Direction.IN)).iterator();
-            otherEdges = IteratorUtils.set(otherVertex.edges(Direction.IN)).iterator();
+            originalEdges = IteratorUtils.list(originalVertex.edges(Direction.IN), Comparators.ELEMENT_COMPARATOR).iterator();
+            otherEdges = IteratorUtils.list(otherVertex.edges(Direction.IN), Comparators.ELEMENT_COMPARATOR).iterator();
             while (originalEdges.hasNext()) {
                 validateEdgeEquality(originalEdges.next(), otherEdges.next());
             }


[8/9] incubator-tinkerpop git commit: Move IoTest to io package with its associated integration test.

Posted by sp...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4700471c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/IoTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/IoTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/IoTest.java
deleted file mode 100644
index cbc3473..0000000
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/IoTest.java
+++ /dev/null
@@ -1,2457 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.tinkerpop.gremlin.structure;
-
-import com.fasterxml.jackson.core.JsonGenerationException;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.databind.ser.std.StdSerializer;
-import org.apache.commons.configuration.Configuration;
-import org.apache.tinkerpop.gremlin.AbstractGremlinTest;
-import org.apache.tinkerpop.gremlin.FeatureRequirement;
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.TestHelper;
-import org.apache.tinkerpop.gremlin.structure.Graph.Features.EdgePropertyFeatures;
-import org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures;
-import org.apache.tinkerpop.gremlin.structure.io.GraphMigrator;
-import org.apache.tinkerpop.gremlin.structure.io.GraphReader;
-import org.apache.tinkerpop.gremlin.structure.io.GraphWriter;
-import org.apache.tinkerpop.gremlin.structure.io.Io;
-import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLIo;
-import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLReader;
-import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLResourceAccess;
-import org.apache.tinkerpop.gremlin.structure.io.graphml.GraphMLWriter;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONResourceAccess;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTokens;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
-import org.apache.tinkerpop.gremlin.structure.io.graphson.LegacyGraphSONReader;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoReader;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter;
-import org.apache.tinkerpop.gremlin.structure.io.gryo.VertexByteArrayInputStream;
-import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedFactory;
-import org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertex;
-import org.apache.tinkerpop.gremlin.util.StreamFactory;
-import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
-import org.junit.Before;
-import org.junit.Test;
-
-import javax.xml.XMLConstants;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.Reader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.Iterator;
-import java.util.List;
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import static org.apache.tinkerpop.gremlin.structure.Graph.Features.ElementFeatures.FEATURE_ANY_IDS;
-import static org.apache.tinkerpop.gremlin.structure.Graph.Features.VariableFeatures.FEATURE_VARIABLES;
-import static org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS;
-import static org.apache.tinkerpop.gremlin.structure.Graph.Features.VertexPropertyFeatures.*;
-import static org.apache.tinkerpop.gremlin.structure.io.IoCore.graphml;
-import static org.apache.tinkerpop.gremlin.structure.io.IoCore.graphson;
-import static org.apache.tinkerpop.gremlin.structure.io.IoCore.gryo;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.mock;
-
-/**
- * @author Joshua Shinavier (http://fortytwo.net)
- * @author Stephen Mallette (http://stephen.genoprime.com)
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public class IoTest extends AbstractGremlinTest {
-
-    private Io.Builder<GraphMLIo> graphml;
-    private Io.Builder<GraphSONIo> graphson;
-    private Io.Builder<GryoIo> gryo;
-
-    @Before
-    public void setupBeforeEachTest() {
-        graphml = graphml();
-        graphson = graphson();
-        gryo = gryo();
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    public void shouldReadGraphML() throws IOException {
-        readGraphMLIntoGraph(graph, "tinkerpop-classic.xml");
-        assertClassicGraph(graph, false, true);
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    public void shouldReadGraphMLUnorderedElements() throws IOException {
-        readGraphMLIntoGraph(graph, "tinkerpop-classic-unordered.xml");
-        assertClassicGraph(graph, false, true);
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_BOOLEAN_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_LONG_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_DOUBLE_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    public void shouldReadGraphMLAnAllSupportedDataTypes() throws IOException {
-        final GraphReader reader = GraphMLReader.build().create();
-        try (final InputStream stream = IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "graph-types.xml")) {
-            reader.readGraph(stream, graph);
-        }
-
-        final Vertex v = graph.vertices().next();
-        assertEquals(123.45d, v.value("d"), 0.000001d);
-        assertEquals("some-string", v.<String>value("s"));
-        assertEquals(29, v.<Integer>value("i").intValue());
-        assertEquals(true, v.<Boolean>value("b"));
-        assertEquals(123.54f, v.value("f"), 0.000001f);
-        assertEquals(10000000l, v.<Long>value("l").longValue());
-        assertEquals("junk", v.<String>value("n"));
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteClassicToGraphMLToFileWithHelpers() throws Exception {
-        final File f = TestHelper.generateTempFile(this.getClass(), name.getMethodName(), ".xml");
-        try {
-            graph.io(graphml).writeGraph(f.getAbsolutePath());
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CLASSIC);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            g1.io(graphml).readGraph(f.getAbsolutePath());
-
-            assertClassicGraph(graph, false, true);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        } catch (Exception ex) {
-            f.delete();
-            throw ex;
-        }
-    }
-
-    /**
-     * Only need to execute this test with TinkerGraph or other graphs that support user supplied identifiers.
-     */
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    public void shouldWriteNormalizedGraphML() throws Exception {
-        try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
-            final GraphMLWriter w = GraphMLWriter.build().normalize(true).create();
-            w.writeGraph(bos, graph);
-
-            final String expected = streamToString(IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphMLResourceAccess.class) + "tinkerpop-classic-normalized.xml"));
-            assertEquals(expected.replace("\n", "").replace("\r", ""), bos.toString().replace("\n", "").replace("\r", ""));
-        }
-    }
-
-    /**
-     * Only need to execute this test with TinkerGraph or other graphs that support user supplied identifiers.
-     */
-    @Test
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_INTEGER_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VariableFeatures.class, feature = FEATURE_VARIABLES)
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    public void shouldWriteNormalizedGraphSON() throws Exception {
-        try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
-            final GraphSONMapper mapper = graph.io(graphson).mapper().normalize(true).create();
-            final GraphSONWriter w = graph.io(graphson).writer().mapper(mapper).create();
-            w.writeGraph(bos, graph);
-
-            final String expected = streamToString(IoTest.class.getResourceAsStream(TestHelper.convertPackageToResourcePath(GraphSONResourceAccess.class) + "tinkerpop-classic-normalized.json"));
-            assertEquals(expected.replace("\n", "").replace("\r", ""), bos.toString().replace("\n", "").replace("\r", ""));
-        }
-    }
-
-    /**
-     * Note: this is only a very lightweight test of writer/reader encoding. It is known that there are characters
-     * which, when written by GraphMLWriter, cause parse errors for GraphMLReader. However, this happens uncommonly
-     * enough that is not yet known which characters those are. Only need to execute this test with TinkerGraph
-     * or other graphs that support user supplied identifiers.
-     */
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_STRING_IDS)
-    public void shouldProperlyEncodeWithGraphML() throws Exception {
-        final Vertex v = graph.addVertex(T.id, "1");
-        v.property(VertexProperty.Cardinality.single, "text", "\u00E9");
-
-        final GraphMLWriter w = GraphMLWriter.build().create();
-
-        final File f = TestHelper.generateTempFile(this.getClass(), "test", ".txt");
-        try (final OutputStream out = new FileOutputStream(f)) {
-            w.writeGraph(out, graph);
-        }
-
-        validateXmlAgainstGraphMLXsd(f);
-
-        // reusing the same config used for creation of "g".
-        final Configuration configuration = graphProvider.newGraphConfiguration("g2", this.getClass(), name.getMethodName(), null);
-        graphProvider.clear(configuration);
-        final Graph g2 = graphProvider.openTestGraph(configuration);
-        final GraphMLReader r = GraphMLReader.build().create();
-
-        try (final InputStream in = new FileInputStream(f)) {
-            r.readGraph(in, g2);
-        }
-
-        final Vertex v2 = g2.vertices("1").next();
-        assertEquals("\u00E9", v2.property("text").value());
-
-        // need to manually close the "g2" instance
-        graphProvider.clear(g2, configuration);
-    }
-
-    /**
-     * This is just a serialization check.
-     */
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_ANY_IDS)
-    public void shouldProperlySerializeCustomIdWithGraphSON() throws Exception {
-        final UUID id = UUID.fromString("AF4B5965-B176-4552-B3C1-FBBE2F52C305");
-        graph.addVertex(T.id, new CustomId("vertex", id));
-
-        final SimpleModule module = new SimpleModule();
-        module.addSerializer(CustomId.class, new CustomId.CustomIdJacksonSerializer());
-        final GraphWriter writer = graph.io(graphson).writer().mapper(
-                graph.io(graphson).mapper().addCustomModule(module).embedTypes(true).create()).create();
-
-        try (final ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
-            writer.writeGraph(baos, graph);
-
-            final JsonNode jsonGraph = new ObjectMapper().readTree(baos.toByteArray());
-            final JsonNode idValue = jsonGraph.get(GraphSONTokens.ID);
-            assertTrue(idValue.has("cluster"));
-            assertEquals("vertex", idValue.get("cluster").asText());
-            assertTrue(idValue.has("elementId"));
-            assertEquals("AF4B5965-B176-4552-B3C1-FBBE2F52C305".toLowerCase(), idValue.get("elementId").asText());
-
-            // reusing the same config used for creation of "g".
-            final Configuration configuration = graphProvider.newGraphConfiguration("g2", this.getClass(), name.getMethodName(), null);
-            graphProvider.clear(configuration);
-            final Graph g2 = graphProvider.openTestGraph(configuration);
-
-            try (final InputStream is = new ByteArrayInputStream(baos.toByteArray())) {
-                final GraphReader reader = graph.io(graphson).reader()
-                        .mapper(graph.io(graphson).mapper().embedTypes(true).addCustomModule(module).create()).create();
-                reader.readGraph(is, g2);
-            }
-
-            final Vertex v2 = g2.vertices().next();
-            final CustomId customId = (CustomId) v2.id();
-            assertEquals(id, customId.getElementId());
-            assertEquals("vertex", customId.getCluster());
-
-            // need to manually close the "g2" instance
-            graphProvider.clear(g2, configuration);
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_ANY_IDS)
-    public void shouldProperlySerializeCustomIdWithGryo() throws Exception {
-        graph.addVertex(T.id, new CustomId("vertex", UUID.fromString("AF4B5965-B176-4552-B3C1-FBBE2F52C305")));
-        final GryoMapper gryo = GryoMapper.build().addCustom(CustomId.class).create();
-
-        final GryoWriter writer = GryoWriter.build().mapper(gryo).create();
-        final GryoReader reader = GryoReader.build().mapper(gryo).create();
-
-        final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), null);
-        graphProvider.clear(configuration);
-        final Graph g1 = graphProvider.openTestGraph(configuration);
-
-        GraphMigrator.migrateGraph(graph, g1, reader, writer);
-
-        final Vertex onlyVertex = g1.traversal().V().next();
-        final CustomId id = (CustomId) onlyVertex.id();
-        assertEquals("vertex", id.getCluster());
-        assertEquals(UUID.fromString("AF4B5965-B176-4552-B3C1-FBBE2F52C305"), id.getElementId());
-
-        // need to manually close the "g1" instance
-        graphProvider.clear(g1, configuration);
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldMigrateGraphWithFloat() throws Exception {
-        final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), null);
-        graphProvider.clear(configuration);
-        final Graph g1 = graphProvider.openTestGraph(configuration);
-
-        final GryoReader reader = graph.io(gryo).reader().create();
-        final GryoWriter writer = graph.io(gryo).writer().create();
-
-        GraphMigrator.migrateGraph(graph, g1, reader, writer);
-
-        assertClassicGraph(g1, false, false);
-
-        // need to manually close the "g1" instance
-        graphProvider.clear(g1, configuration);
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldMigrateGraph() throws Exception {
-        final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
-        graphProvider.clear(configuration);
-        final Graph g1 = graphProvider.openTestGraph(configuration);
-
-        final GryoReader reader = graph.io(gryo).reader().create();
-        final GryoWriter writer = graph.io(gryo).writer().create();
-
-        GraphMigrator.migrateGraph(graph, g1, reader, writer);
-
-        // by making this lossy for float it will assert floats for doubles
-        assertModernGraph(g1, true, false);
-
-        // need to manually close the "g1" instance
-        graphProvider.clear(g1, configuration);
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteModernToGryo() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeGraph(os, graph);
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
-            graphProvider.clear(configuration);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            final byte[] x = os.toByteArray();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(x)) {
-                reader.readGraph(bais, g1);
-            }
-
-            // by making this lossy for float it will assert floats for doubles
-            assertModernGraph(g1, true, false);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteModernToGryoToFileWithHelpers() throws Exception {
-        final File f = TestHelper.generateTempFile(this.getClass(), name.getMethodName(), ".kryo");
-        try {
-            graph.io(gryo).writeGraph(f.getAbsolutePath());
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            g1.io(gryo).readGraph(f.getAbsolutePath());
-
-            // by making this lossy for float it will assert floats for doubles
-            assertModernGraph(g1, true, false);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        } catch (Exception ex) {
-            f.delete();
-            throw ex;
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CREW)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteCrewToGryo() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeGraph(os, graph);
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CREW);
-            graphProvider.clear(configuration);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            final GryoReader reader = GryoReader.build()
-                    .mapper(graph.io(gryo).mapper().create()).create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readGraph(bais, g1);
-            }
-
-            // by making this lossy for float it will assert floats for doubles
-            assertCrewGraph(g1, false);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        }
-    }
-
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteClassicToGryo() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeGraph(os, graph);
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CLASSIC);
-            graphProvider.clear(configuration);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readGraph(bais, g1);
-            }
-
-            assertClassicGraph(g1, false, false);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteClassicToGraphSON() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeGraph(os, graph);
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CLASSIC);
-            graphProvider.clear(configuration);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readGraph(bais, g1);
-            }
-
-            assertClassicGraph(g1, true, false);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteModernToGraphSON() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeGraph(os, graph);
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
-            graphProvider.clear(configuration);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readGraph(bais, g1);
-            }
-
-            assertModernGraph(g1, true, false);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteModernToGraphSONWithHelpers() throws Exception {
-        final File f = TestHelper.generateTempFile(this.getClass(), name.getMethodName(), ".json");
-        try {
-            graph.io(graphson).writeGraph(f.getAbsolutePath());
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.MODERN);
-            graphProvider.clear(configuration);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            g1.io(graphson).readGraph(f.getAbsolutePath());
-
-            assertModernGraph(g1, true, false);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        } catch (Exception ex) {
-            f.delete();
-            throw ex;
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CREW)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_USER_SUPPLIED_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    public void shouldReadWriteCrewToGraphSON() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeGraph(os, graph);
-
-            final Configuration configuration = graphProvider.newGraphConfiguration("readGraph", this.getClass(), name.getMethodName(), LoadGraphWith.GraphData.CREW);
-            graphProvider.clear(configuration);
-            final Graph g1 = graphProvider.openTestGraph(configuration);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readGraph(bais, g1);
-            }
-
-            assertCrewGraph(g1, true);
-
-            // need to manually close the "g1" instance
-            graphProvider.clear(g1, configuration);
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    public void shouldReadWriteEdgeToGryoUsingFloatProperty() throws Exception {
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw");
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), detachedEdge.id());
-                    assertEquals(v1.id(), detachedEdge.outVertex().id());
-                    assertEquals(v2.id(), detachedEdge.inVertex().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(0.5f, detachedEdge.properties("weight").next().value());
-                    assertEquals("rw", detachedEdge.properties("acl").next().value());
-
-                    called.set(true);
-
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteEdgeToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v1.addEdge("friend", v2, "weight", 0.5d, "acl", "rw");
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), detachedEdge.id());
-                    assertEquals(v1.id(), detachedEdge.outVertex().id());
-                    assertEquals(v2.id(), detachedEdge.inVertex().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(0.5d, e.properties("weight").next().value());
-                    assertEquals("rw", e.properties("acl").next().value());
-                    called.set(true);
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedEdgeAsReferenceToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5d, "acl", "rw"), false);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), detachedEdge.id());
-                    assertEquals(v1.id(), detachedEdge.outVertex().id());
-                    assertEquals(v2.id(), detachedEdge.inVertex().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
-                    called.set(true);
-
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedEdgeToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5d, "acl", "rw"), true);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), detachedEdge.id());
-                    assertEquals(v1.id(), detachedEdge.outVertex().id());
-                    assertEquals(v2.id(), detachedEdge.inVertex().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(0.5d, detachedEdge.properties("weight").next().value());
-                    assertEquals("rw", detachedEdge.properties("acl").next().value());
-                    called.set(true);
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteEdgeToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw");
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
-                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
-                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(0.5d, detachedEdge.properties("weight").next().value());
-                    assertEquals("rw", detachedEdge.properties("acl").next().value());
-                    called.set(true);
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedEdgeAsReferenceToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw"), false);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
-                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
-                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
-                    called.set(true);
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedEdgeToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = DetachedFactory.detach(v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw"), true);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
-                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
-                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(0.5d, detachedEdge.properties("weight").next().value());
-                    assertEquals("rw", detachedEdge.properties("acl").next().value());
-                    called.set(true);
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_NUMERIC_IDS)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = FEATURE_USER_SUPPLIED_IDS)
-    public void shouldReadWriteEdgeToGraphSONNonLossy() throws Exception {
-        final Vertex v1 = graph.addVertex(T.id, 1l, T.label, "person");
-        final Vertex v2 = graph.addVertex(T.id, 2l, T.label, "person");
-        final Edge e = v1.addEdge("friend", v2, "weight", 0.5f, "acl", "rw");
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), detachedEdge.id());
-                    assertEquals(v1.id(), detachedEdge.outVertex().id());
-                    assertEquals(v2.id(), detachedEdge.inVertex().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(0.5f, detachedEdge.properties("weight").next().value());
-                    assertEquals("rw", detachedEdge.properties("acl").next().value());
-                    called.set(true);
-
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_SERIALIZABLE_VALUES)
-    public void shouldSupportUUIDInGraphSON() throws Exception {
-        final UUID id = UUID.randomUUID();
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v1.addEdge("friend", v2, "uuid", id);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().mapper(graph.io(graphson).mapper().embedTypes(true).create()).create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    // a quick reminder here that the purpose of these id assertions is to ensure that those with
-                    // complex ids that are not simply toString'd (i.e. are complex objects in JSON as well)
-                    // properly respond to filtering in Graph.edges/vertices
-                    assertEquals(e.id(), graph.edges(detachedEdge.id()).next().id());
-                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id()).next().id());
-                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id()).next().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
-                    assertEquals(id, detachedEdge.value("uuid"));
-
-                    called.set(true);
-
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_SERIALIZABLE_VALUES)
-    public void shouldSupportUUIDInGryo() throws Exception {
-        final UUID id = UUID.randomUUID();
-        final Vertex v1 = graph.addVertex(T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v1.addEdge("friend", v2, "uuid", id);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeEdge(os, e);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readEdge(bais, edge -> {
-                    final Edge detachedEdge = (Edge) edge;
-                    assertEquals(e.id(), detachedEdge.id());
-                    assertEquals(v1.id(), detachedEdge.outVertex().id());
-                    assertEquals(v2.id(), detachedEdge.inVertex().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(v2.label(), detachedEdge.inVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(e.keys().size(), IteratorUtils.count(detachedEdge.properties()));
-                    assertEquals(id, detachedEdge.value("uuid"));
-
-                    called.set(true);
-
-                    return null;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    public void shouldReadWriteVertexNoEdgesToGryoUsingFloatProperty() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
-
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5f);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeVertex(os, v1);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), detachedVertex.id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals(v1.value("name"), detachedVertex.value("name").toString());
-                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
-                    called.set(true);
-                    return mock(Vertex.class);
-                });
-            }
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteVertexNoEdgesToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5d);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeVertex(os, v1);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), detachedVertex.id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals(v1.value("name"), detachedVertex.value("name").toString());
-                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
-                    called.set(true);
-                    return mock(Vertex.class);
-                });
-            }
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedVertexNoEdgesToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5d);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            final DetachedVertex dv = DetachedFactory.detach(v1, true);
-            writer.writeVertex(os, dv);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), detachedVertex.id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals("marko", detachedVertex.properties("name").next().value());
-                    assertEquals("rw", detachedVertex.properties("acl").next().value());
-                    called.set(true);
-                    return mock(Vertex.class);
-                });
-            }
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedVertexAsReferenceNoEdgesToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5d);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            final DetachedVertex dv = DetachedFactory.detach(v1, false);
-            writer.writeVertex(os, dv);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), detachedVertex.id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(0, IteratorUtils.count(detachedVertex.properties()));
-                    called.set(true);
-                    return mock(Vertex.class);
-                });
-            }
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
-    public void shouldReadWriteVertexMultiPropsNoEdgesToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "name", "mark", "acl", "rw");
-        v1.property(VertexProperty.Cardinality.single, "propsSquared", 123, "x", "a", "y", "b");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5d);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeVertex(os, v1);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), detachedVertex.id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(4, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals("a", detachedVertex.property("propsSquared").value("x"));
-                    assertEquals("b", detachedVertex.property("propsSquared").value("y"));
-                    assertEquals(2, IteratorUtils.count(detachedVertex.properties("name")));
-                    assertTrue(StreamFactory.stream(detachedVertex.properties("name")).allMatch(p -> p.key().equals("name") && (p.value().equals("marko") || p.value().equals("mark"))));
-                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
-                    called.set(true);
-                    return mock(Vertex.class);
-                });
-            }
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteVertexNoEdgesToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5f);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeVertex(os, v1);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals("marko", detachedVertex.properties("name").next().value());
-                    assertEquals("rw", detachedVertex.properties("acl").next().value());
-                    called.set(true);
-                    return detachedVertex;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedVertexNoEdgesToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5f);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            final DetachedVertex dv = DetachedFactory.detach(v1, true);
-            writer.writeVertex(os, dv);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(2, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals("marko", detachedVertex.properties("name").next().value());
-                    assertEquals("rw", detachedVertex.properties("acl").next().value());
-                    called.set(true);
-                    return detachedVertex;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteDetachedVertexAsReferenceNoEdgesToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "acl", "rw");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5f);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            final DetachedVertex dv = DetachedFactory.detach(v1, false);
-            writer.writeVertex(os, dv);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(0, IteratorUtils.count(detachedVertex.properties()));
-
-                    called.set(true);
-                    return detachedVertex;
-                });
-            }
-
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
-    public void shouldReadWriteVertexMultiPropsNoEdgesToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", "name", "mark", "acl", "rw");
-        v1.property(VertexProperty.Cardinality.single, "propsSquared", 123, "x", "a", "y", "b");
-        final Vertex v2 = graph.addVertex();
-        v1.addEdge("friends", v2, "weight", 0.5d);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeVertex(os, v1);
-
-            final AtomicBoolean called = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(4, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals("a", detachedVertex.property("propsSquared").value("x"));
-                    assertEquals("b", detachedVertex.property("propsSquared").value("y"));
-                    assertEquals(2, IteratorUtils.count(detachedVertex.properties("name")));
-                    assertTrue(StreamFactory.stream(detachedVertex.properties("name")).allMatch(p -> p.key().equals("name") && (p.value().equals("marko") || p.value().equals("mark"))));
-                    assertEquals(v1.value("acl"), detachedVertex.value("acl").toString());
-                    called.set(true);
-                    return mock(Vertex.class);
-                });
-            }
-            assertTrue(called.get());
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    public void shouldReadWriteVerticesNoEdgesToGryoManual() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeVertices(os, g.V().has("age", P.gt(30)));
-
-            final AtomicInteger called = new AtomicInteger(0);
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final VertexByteArrayInputStream vbais = new VertexByteArrayInputStream(new ByteArrayInputStream(os.toByteArray()))) {
-                final byte[] y = vbais.readVertexBytes().toByteArray();
-                reader.readVertex(new ByteArrayInputStream(y),
-                        attachable -> {
-                            final Vertex detachedVertex = attachable.get();
-                            called.incrementAndGet();
-                            return detachedVertex;
-                        });
-
-                final byte[] z = vbais.readVertexBytes().toByteArray();
-                reader.readVertex(new ByteArrayInputStream(z),
-                        attachable -> {
-                            final Vertex detachedVertex = attachable.get();
-                            called.incrementAndGet();
-                            return detachedVertex;
-                        });
-            }
-
-            assertEquals(2, called.get());
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
-    public void shouldReadWriteVerticesNoEdgesToGryo() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeVertices(os, g.V().has("age", P.gt(30)));
-
-            final AtomicInteger called = new AtomicInteger(0);
-            final GryoReader reader = graph.io(gryo).reader().create();
-
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                final Iterator<Vertex> itty = reader.readVertices(bais,
-                        attachable -> {
-                            final Vertex detachedVertex = attachable.get();
-                            called.incrementAndGet();
-                            return detachedVertex;
-                        }, null, null);
-
-                assertNotNull(itty.next());
-                assertNotNull(itty.next());
-                assertFalse(itty.hasNext());
-            }
-
-            assertEquals(2, called.get());
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
-    public void shouldReadWriteVerticesNoEdgesToGraphSON() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeVertices(os, g.V().has("age", P.gt(30)));
-
-            final AtomicInteger called = new AtomicInteger(0);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                final Iterator<Vertex> itty = reader.readVertices(bais,
-                        attachable -> {
-                            final Vertex detachedVertex = attachable.get();
-                            called.incrementAndGet();
-                            return detachedVertex;
-                        }, null, null);
-
-                assertNotNull(itty.next());
-                assertNotNull(itty.next());
-                assertFalse(itty.hasNext());
-            }
-
-            assertEquals(2, called.get());
-        }
-    }
-
-    @Test
-    @LoadGraphWith(LoadGraphWith.GraphData.CLASSIC)
-    public void shouldReadWriteVerticesNoEdgesToGraphSONManual() throws Exception {
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeVertices(os, g.V().has("age", P.gt(30)));
-
-            final AtomicInteger called = new AtomicInteger(0);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            final BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(os.toByteArray())));
-            String line = br.readLine();
-            reader.readVertex(new ByteArrayInputStream(line.getBytes()),
-                    attachable -> {
-                        called.incrementAndGet();
-                        return mock(Vertex.class);
-                    });
-
-            line = br.readLine();
-            reader.readVertex(new ByteArrayInputStream(line.getBytes()),
-                    detachedVertex -> {
-                        called.incrementAndGet();
-                        return mock(Vertex.class);
-                    });
-
-            assertEquals(2, called.get());
-        }
-    }
-
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteVertexWithOUTEdgesToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", T.label, "person");
-
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v1.addEdge("friends", v2, "weight", 0.5d);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeVertex(os, v1, Direction.OUT);
-
-            final AtomicBoolean calledVertex = new AtomicBoolean(false);
-            final AtomicBoolean calledEdge = new AtomicBoolean(false);
-            final GryoReader reader = graph.io(gryo).reader().create();
-
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                            final Vertex detachedVertex = attachable.get();
-                            TestHelper.validateVertexEquality(v1, detachedVertex, true);
-                            calledVertex.set(true);
-                            return detachedVertex;
-                        },
-                        attachable -> {
-                            final Edge detachedEdge = attachable.get();
-                            TestHelper.validateEdgeEquality(e, detachedEdge);
-                            calledEdge.set(true);
-
-                            return detachedEdge;
-                        }, Direction.OUT);
-            }
-
-            assertTrue(calledVertex.get());
-            assertTrue(calledEdge.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteVertexWithOUTEdgesToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v1.addEdge("friends", v2, "weight", 0.5f);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GraphSONWriter writer = graph.io(graphson).writer().create();
-            writer.writeVertex(os, v1, Direction.OUT);
-
-            final AtomicBoolean calledVertex = new AtomicBoolean(false);
-            final AtomicBoolean calledEdge = new AtomicBoolean(false);
-            final GraphSONReader reader = graph.io(graphson).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    assertEquals(v1.id(), graph.vertices(detachedVertex.id().toString()).next().id());
-                    assertEquals(v1.label(), detachedVertex.label());
-                    assertEquals(1, IteratorUtils.count(detachedVertex.properties()));
-                    assertEquals("marko", detachedVertex.value("name"));
-                    calledVertex.set(true);
-                    return null;
-                }, attachable -> {
-                    final Edge detachedEdge = attachable.get();
-                    assertEquals(e.id(), graph.edges(detachedEdge.id().toString()).next().id());
-                    assertEquals(v1.id(), graph.vertices(detachedEdge.outVertex().id().toString()).next().id());
-                    assertEquals(v2.id(), graph.vertices(detachedEdge.inVertex().id().toString()).next().id());
-                    assertEquals(v1.label(), detachedEdge.outVertex().label());
-                    assertEquals(e.label(), detachedEdge.label());
-                    assertEquals(1, IteratorUtils.count(detachedEdge.properties()));
-                    assertEquals(0.5d, detachedEdge.value("weight"), 0.000001d);                      // lossy
-
-                    calledEdge.set(true);
-                    return null;
-                }, Direction.OUT);
-            }
-
-            assertTrue(calledVertex.get());
-            assertTrue(calledEdge.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteVertexWithINEdgesToGryo() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", T.label, "person");
-
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v2.addEdge("friends", v1, "weight", 0.5d);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            final GryoWriter writer = graph.io(gryo).writer().create();
-            writer.writeVertex(os, v1, Direction.IN);
-
-            final AtomicBoolean calledVertex = new AtomicBoolean(false);
-            final AtomicBoolean calledEdge = new AtomicBoolean(false);
-
-            final GryoReader reader = graph.io(gryo).reader().create();
-            try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
-                reader.readVertex(bais, attachable -> {
-                    final Vertex detachedVertex = attachable.get();
-                    TestHelper.validateVertexEquality(v1, detachedVertex, true);
-                    calledVertex.set(true);
-                    return detachedVertex;
-                }, attachable -> {
-                    final Edge detachedEdge = attachable.get();
-                    TestHelper.validateEdgeEquality(e, detachedEdge);
-                    calledEdge.set(true);
-
-                    return detachedEdge;
-                }, Direction.IN);
-            }
-
-            assertTrue(calledVertex.get());
-            assertTrue(calledEdge.get());
-        }
-    }
-
-    @Test
-    @FeatureRequirement(featureClass = Graph.Features.EdgeFeatures.class, feature = Graph.Features.EdgeFeatures.FEATURE_ADD_EDGES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = VertexPropertyFeatures.class, feature = FEATURE_STRING_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_FLOAT_VALUES)
-    @FeatureRequirement(featureClass = EdgePropertyFeatures.class, feature = EdgePropertyFeatures.FEATURE_DOUBLE_VALUES)
-    public void shouldReadWriteVertexWithINEdgesToGraphSON() throws Exception {
-        final Vertex v1 = graph.addVertex("name", "marko", T.label, "person");
-        final Vertex v2 = graph.addVertex(T.label, "person");
-        final Edge e = v2.addEdge("friends", v1, "weight", 0.5f);
-
-        try (final ByteArrayOutputStream os = new ByteArrayOutp

<TRUNCATED>