public void testBaz() throws Exception
    {
        Schema<Baz> schema = Baz.getSchema();
        for (Baz message : new Baz[] { baz, negativeBaz })
        {
            byte[] data = XmlXIOUtil.toByteArray(message, schema,
                    buf());

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            XmlXIOUtil.writeTo(out, message, schema, buf());

            assertTrue(Arrays.equals(data, out.toByteArray()));
        }
    }
Tests for XmlXOutput.

@author David Yu
@created Aug 30, 2012
protostuff-xml/src/test/java/io/protostuff/XmlXTest.java