public void testPartialEmptyMessage() throws Exception
    {
        Baz baz = new Baz();
        Bar bar = new Bar();
        bar.setSomeInt(1);
        bar.setSomeBaz(baz);

        byte[] data = JsonIOUtil.toByteArray(bar, bar.cachedSchema(), false);
        assertEquals(new String(data, "UTF-8"), "{\"someInt\":1,\"someBaz\":{}}");

        Bar parsedBar = new Bar();
        JsonIOUtil.mergeFrom(data, parsedBar, parsedBar.cachedSchema(), false);
        SerializableObjects.assertEquals(bar, parsedBar);
    }
Testing for json ser/deser against messages.

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