public void testBar() throws Exception
    {
        Schema<Bar> schema = RuntimeSchema.getSchema(Bar.class);

        for (Bar barCompare : new Bar[] { bar, negativeBar })
        {
            Bar dbar = new Bar();

            byte[] data = JsonIOUtil.toByteArray(barCompare, schema, false);
            JsonIOUtil.mergeFrom(data, dbar, schema, false);
            SerializableObjects.assertEquals(barCompare, dbar);
        }
    }
Testing for json ser/deser against runtime messages.

@author David Yu
@created Nov 20, 2009
protostuff-json/src/test/java/io/protostuff/JsonRuntimeSerDeserTest.java