public void testBar() throws Exception
    {
        Schema<Bar> schema = RuntimeSchema.getSchema(Bar.class);

        for (Bar barCompare : new Bar[] { bar, negativeBar })
        {
            Bar dbar = new Bar();

            byte[] data = XmlIOUtil.toByteArray(barCompare, schema);
            XmlIOUtil.mergeFrom(data, dbar, schema);
            SerializableObjects.assertEquals(barCompare, dbar);
        }
    }
Testing for xml ser/deser against runtime messages.

@author David Yu
@created May 25, 2010
protostuff-xml/src/test/java/io/protostuff/XmlRuntimeSerDeserTest.java