public void testFoo() throws Exception
    {
        Schema<Foo> schema = Foo.getSchema();
        Foo message = foo;

        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