final Vertex v2 = g.addVertex();
v1.addEdge("friends", v2, "weight", 0.5d);
try (final ByteArrayOutputStream os = new ByteArrayOutputStream()) {
final KryoWriter writer = KryoWriter.build().custom(graphProvider.createConfiguredGremlinKryo()).create();
writer.writeVertex(os, v1, Direction.OUT);
final KryoReader reader = KryoReader.build()
.custom(graphProvider.createConfiguredGremlinKryo())
.workingDirectory(File.separator + "tmp").create();
try (final ByteArrayInputStream bais = new ByteArrayInputStream(os.toByteArray())) {