@Override
    public byte[] write(final Object o, final Class<?> clazz, final String entryName) throws Exception  {
        final byte[] bytes =  mapper.writeValueAsBytes(o);

        // write out files for debugging purposes
        final File f = new File(testCaseDataPath + File.separator + entryName + "-" + getCompatibility() + ".json");
        if (f.exists()) f.delete();
        try (FileOutputStream fileOuputStream = new FileOutputStream(f)) {
            fileOuputStream.write(bytes);
        }

        return bytes;
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-util/src/test/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONUntypedCompatibilityTest.java