public void testEmptyFooDeeper() throws Exception
    {
        Foo foo = new Foo();
        ArrayList<Bar> bars = new ArrayList<Bar>();
        Bar bar = new Bar();
        bar.setSomeBaz(new Baz());
        bars.add(bar);
        foo.setSomeBar(bars);

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

        Foo parsedFoo = new Foo();
        JsonIOUtil.mergeFrom(data, parsedFoo, parsedFoo.cachedSchema(), false);
        SerializableObjects.assertEquals(foo, parsedFoo);
    }
Testing for json ser/deser against messages.

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