@Test
    public void deserializersTestsEdge() {
        final TinkerGraph tg = TinkerGraph.open();

        final Vertex v = tg.addVertex("vertexTest");
        final Vertex v2 = tg.addVertex("vertexTest");

        final Edge ed = v.addEdge("knows", v2, "time", LocalDateTime.now());

        final GraphWriter writer = getWriter(defaultMapperV2);
        final GraphReader reader = getReader(defaultMapperV2);

        try (final ByteArrayOutputStream out = new ByteArrayOutputStream()) {
            writer.writeObject(out, ed);
            final String json = out.toString();

            // Object works, because there's a type in the payload now
            // Edge.class would work as well
            // Anything else would not because we check the type in param here with what's in the JSON, for safety.
            final Edge eRead = (Edge)reader.readObject(new ByteArrayInputStream(json.getBytes()), Object.class);
            assertEquals(ed, eRead);
        } catch (IOException e) {
            e.printStackTrace();
            fail("Should not have thrown exception: " + e.getMessage());
        }
    }
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