@Test
    public void shouldFindRegisteredClassesByIoImplementationAndSerializer() {
        // note that this is a non-standard usage of IoRegistry strictly for testing purposes - refer to javadocs
        // for proper usage
        final FakeIoRegistry registry = new FakeIoRegistry();
        registry.register(GryoIo.class, Long.class, "test");
        registry.register(GryoIo.class, Integer.class, 1);
        registry.register(GryoIo.class, String.class, 1L);
        registry.register(GraphSONIo.class, Short.class, 100);

        final List<Pair<Class, Number>> foundGryo = registry.find(GryoIo.class, Number.class);
        assertEquals(2, foundGryo.size());
        assertEquals(String.class, foundGryo.get(1).getValue0());
        assertEquals(1L, foundGryo.get(1).getValue1());
        assertEquals(1, foundGryo.get(0).getValue1());
        assertEquals(Integer.class, foundGryo.get(0).getValue0());

        final List<Pair<Class, Date>> foundGraphSON = registry.find(GraphSONIo.class, Date.class);
        assertEquals(0, foundGraphSON.size());
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/structure/io/IoRegistryTest.java