@Test
    public void testEmptyFooInner() throws Exception
    {
        Foo foo = new Foo();
        ArrayList<Bar> bars = new ArrayList<Bar>();
        bars.add(new Bar());
        foo.setSomeBar(bars);

        byte[] data = XmlIOUtil.toByteArray(foo, foo.cachedSchema());

        /*
         * assertEquals(new String(data, "UTF-8"), "<?xml version='1.0' encoding='UTF-8'?>" + "<Foo>" + "<someBar>" +
         * "<Bar/>" + "</someBar>" + "</Foo>");
         */

        Foo parsedFoo = new Foo();
        XmlIOUtil.mergeFrom(data, parsedFoo, parsedFoo.cachedSchema());
        SerializableObjects.assertEquals(foo, parsedFoo);
    }
Testing for xml ser/deser against messages.

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