@Test
    public void testBar() throws Exception
    {
        for (Bar barCompare : new Bar[] { bar, negativeBar })
        {
            Bar dbar = new Bar();

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

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