public void testBarList() throws Exception
    {
        Bar barCompare = bar;
        ArrayList<Bar> list = new ArrayList<Bar>();
        list.add(bar);
        list.add(negativeBar);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        int total = writeListTo(out, list, barCompare.cachedSchema());

        ByteArrayOutputStream out2 = new ByteArrayOutputStream();
        LinkedBuffer buffer = new LinkedBuffer(512);
        int total2 = writeListTo(buffer, list, barCompare.cachedSchema());
        LinkedBuffer.writeTo(out2, buffer);

        byte[] data = out.toByteArray();
        byte[] data2 = out2.toByteArray();

        assertTrue(data.length == total);
        assertTrue(data2.length == total2);
        assertTrue(total == total2);

        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