@SuppressWarnings("null")
    @Test
    @Ignore
    public final void testSanity() throws IOException {
        @SuppressWarnings("unused")
        String a, b;
        {
            Random random = new Random(42L);
            JsonGenerator generator = null;
            ByteArrayOutputStream generatorOut = new ByteArrayOutputStream();
            try {
                generator = new JsonFactory().createJsonGenerator(generatorOut,
                        JsonEncoding.UTF8);
            } catch (IOException e) {
                e.printStackTrace();
                fail();
            }
            try {
                OutputWithGenerator.serialize(generatedDoc(random), generator);
            } catch (IOException e) {
                e.printStackTrace();
                fail();
            }
            try {
                generator.close();
            } catch (IOException e) {
                e.printStackTrace();
                fail();
            }
            a = generatorOut.toString("UTF-8");
        }
        {
            Random random = new Random(42L);
            ByteArrayOutputStream writerOut = new ByteArrayOutputStream();
            JSONWriter writer = new JSONWriter(writerOut);
            try {
                OutputWithWriter.serialize(generatedDoc(random), writer);
            } catch (IOException e) {
                e.printStackTrace();
                fail();
            }
            b = writerOut.toString("UTF-8");
        }
        // dumpToFile("/tmp/a", a);
        // dumpToFile("/tmp/b", b);
    }
Object identity is used to differentiate between different implementation strategies, toString() is used to print a report.

@return an object with a descriptive toString() for the implementation under test
vespajlib/src/test/java/com/yahoo/text/JsonMicroBenchmarkTestCase.java