final GraphSONWriter writer = GraphSONWriter.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
writer.writeVertex(os, v1, Direction.OUT);
final AtomicBoolean calledVertex = new AtomicBoolean(false);
final AtomicBoolean calledEdge = new AtomicBoolean(false);
final GraphSONReader reader = GraphSONReader.build().customModule(graphProvider.createConfiguredGraphSONModule()).create();
try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
reader.readVertex(bais, Direction.OUT, detachedVertex -> {
assertEquals(v1.id().toString(), detachedVertex.id().toString()); // lossy
assertEquals(v1.label(), detachedVertex.label());
assertEquals(0, StreamFactory.stream(detachedVertex.iterators().hiddenPropertyIterator()).count());
assertEquals(1, StreamFactory.stream(detachedVertex.iterators().propertyIterator()).count());
assertEquals("marko", detachedVertex.value("name"));