@Test
        @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
        public void shouldSerializeTraversalMetrics() throws Exception {
            final GryoIo gryoIo = graph.io(GryoIo.build(GryoVersion.V3_0));
            final GryoWriter gryoWriter = gryoIo.writer().create();
            final GryoReader gryoReader = gryoIo.reader().create();

            final TraversalMetrics before = (TraversalMetrics) g.V().both().profile().next();
            final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
            gryoWriter.writeObject(outputStream, before);

            final ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
            final TraversalMetrics after = gryoReader.readObject(inputStream, TraversalMetrics.class);
            assertNotNull(after);
            assertEquals(before.getMetrics().size(), after.getMetrics().size());
            assertEquals(before.getDuration(TimeUnit.MILLISECONDS), after.getDuration(TimeUnit.MILLISECONDS));
            assertEquals(before.getMetrics(0).getCounts(), after.getMetrics().stream().findFirst().get().getCounts());
        }
Serialization tests that occur at a lower level than IO.  Note that there is no need to test GraphML here as
it is not a format that can be used for generalized serialization (i.e. it only serializes an entire graph).

@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/SerializationTest.java