@Test
    @LoadGraphWith(LoadGraphWith.GraphData.MODERN)
    public void shouldReadWriteVerticesNoEdges() throws Exception {
        try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
            final GraphWriter writer = writerMaker.apply(graph);
            writer.writeVertices(os, g.V().has("age", P.gt(30)));

            final AtomicInteger called = new AtomicInteger(0);
            final GraphReader reader = readerMaker.apply(graph);

            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());
        }
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoVertexTest.java