writer.writeVertex(os, v1, Direction.BOTH);
final AtomicBoolean vertexCalled = new AtomicBoolean(false);
final AtomicBoolean edgeCalled = new AtomicBoolean(false);
final KryoReader reader = KryoReader.build()
.custom(graphProvider.createConfiguredGremlinKryo())
.workingDirectory(File.separator + "tmp").create();
try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {
reader.readVertex(bais, Direction.OUT, detachedVertex -> {
assertEquals(v1.id(), detachedVertex.id());
assertEquals(v1.label(), detachedVertex.label());
assertEquals(0, StreamFactory.stream(detachedVertex.iterators().hiddenPropertyIterator()).count());
assertEquals(1, StreamFactory.stream(detachedVertex.iterators().propertyIterator()).count());
assertEquals(v1.value("name"), detachedVertex.value("name").toString());