public void testEmptyBar() throws Exception
    {
        ArrayList<Bar> bars = new ArrayList<Bar>();
        bars.add(new Bar());
        bars.add(new Bar());

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

        ByteArrayInputStream in = new ByteArrayInputStream(data);
        List<Bar> parsedBars = parseListFrom(in, SerializableObjects.bar.cachedSchema());

        assertTrue(parsedBars.size() == bars.size());
        int i = 0;
        for (Bar b : parsedBars)
            SerializableObjects.assertEquals(bars.get(i++), b);
    }
Testcase for ser/deser of multiple messages.

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