@Test
    public void shouldWriteReadWithCustomIoRegistryGryo() throws Exception {
        final UUID uuid = UUID.randomUUID();
        g.addV("person").property("name","stephen").property("custom", new CustomId("a", uuid)).iterate();

        final File file = TestHelper.generateTempFile(TinkerGraphIoStepTest.class, "shouldWriteReadWithCustomIoRegistryGryo", ".kryo");
        g.io(file.getAbsolutePath()).with(IO.registry, CustomId.CustomIdIoRegistry.class.getName()).write().iterate();

        final Graph emptyGraph = TinkerGraph.open();
        final GraphTraversalSource emptyG = emptyGraph.traversal();

        try {
            emptyG.io(file.getAbsolutePath()).read().iterate();
            fail("Can't read without a registry");
        } catch (Exception ignored) {
            // do nothing
        }

        emptyG.io(file.getAbsolutePath()).with(IO.registry, CustomId.CustomIdIoRegistry.instance()).read().iterate();

        assertEquals(1, emptyG.V().has("custom", new CustomId("a", uuid)).count().next().intValue());
    }
It was hard to test the {@link IO#registry} configuration as a generic test. Opted to test it as a bit of a
standalone test with TinkerGraph.

@author Stephen Mallette (http://stephen.genoprime.com)
tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/traversal/step/sideEffect/TinkerGraphIoStepTest.java