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

        ArrayList<Foo> foos = new ArrayList<Foo>();
        Foo foo = new Foo();
        foo.setSomeBar(bars);

        foos.add(foo);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        writeListTo(out, foos, SerializableObjects.foo.cachedSchema());
        byte[] data = out.toByteArray();

        ByteArrayInputStream in = new ByteArrayInputStream(data);
        List<Foo> parsedFoos = parseListFrom(in, SerializableObjects.foo.cachedSchema());

        assertTrue(parsedFoos.size() == foos.size());
        int i = 0;
        for (Foo f : parsedFoos)
            SerializableObjects.assertEquals(foos.get(i++), f);
    }
Testcase for ser/deser of multiple messages.

@author David Yu
@created Jan 14, 2010
protostuff-core/src/test/java/io/protostuff/RepeatedMessagesTest.java