public static InputStream getResourceAsStream(Class<?> resourceClass, final String file) {
      return IoTest.class.getResourceAsStream( "/"
                                               + resourceClass.getPackage().getName().replaceAll("\\.", "/")
                                               + "/"
                                               + file);
    }
This is just a serialization check for JSON.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java