@Test
    public void shouldKeepTypesWhenDeserializingSerializedTinkerGraph() throws IOException {
        final TinkerGraph tg = TinkerGraph.open();

        final Vertex v = tg.addVertex("vertexTest");
        final UUID uuidProp = UUID.randomUUID();
        final Duration durationProp = Duration.ofHours(3);
        final Long longProp = 2L;
        final ByteBuffer byteBufferProp = ByteBuffer.wrap("testbb".getBytes());
        final InetAddress inetAddressProp = InetAddress.getByName("10.10.10.10");

        // One Java util type natively supported by Jackson
        v.property("uuid", uuidProp);
        // One custom time type added by the GraphSON module
        v.property("duration", durationProp);
        // One Java native type not handled by JSON natively
        v.property("long", longProp);
        // One Java util type added by GraphSON
        v.property("bytebuffer", byteBufferProp);
        v.property("inetaddress", inetAddressProp);


        final GraphWriter writer = getWriter(defaultMapperV2);
        final GraphReader reader = getReader(defaultMapperV2);
        try (final ByteArrayOutputStream out = new ByteArrayOutputStream()) {
            writer.writeGraph(out, tg);
            final String json = out.toString();
            final TinkerGraph read = TinkerGraph.open();
            reader.readGraph(new ByteArrayInputStream(json.getBytes()), read);
            final Vertex vRead = read.traversal().V().hasLabel("vertexTest").next();
            assertEquals(vRead.property("uuid").value(), uuidProp);
            assertEquals(vRead.property("duration").value(), durationProp);
            assertEquals(vRead.property("long").value(), longProp);
            assertEquals(vRead.property("bytebuffer").value(), byteBufferProp);
            assertEquals(vRead.property("inetaddress").value(), inetAddressProp);
        }
    }
Those kinds of types are declared differently in the GraphSON type deserializer, check that all are handled
properly.
tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraphGraphSONSerializerV2Test.java