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

        byte[] data = toByteArray(foo, foo.cachedSchema());

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        writeTo(out, foo, foo.cachedSchema());
        byte[] data2 = out.toByteArray();

        String text = STRING.deser(data);
        String text2 = STRING.deser(data2);

        assertEquals(text, text2);
        print(text);
    }
Serialization tests for yaml.

@author David Yu
@created Jun 28, 2010
protostuff-yaml/src/test/java/io/protostuff/YamlSerTest.java