}
@Test
public void testReader() throws Exception {
XmlTreeStreamReaderImpl reader = new XmlTreeStreamReaderImpl(root);
XMLStreamSerializer serializer = new XMLStreamSerializer();
StringWriter sw = new StringWriter();
XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
XMLStreamWriter writer = outputFactory.createXMLStreamWriter(sw);
serializer.serialize(reader, writer);
String xml = sw.toString();
XMLAssert.assertXMLEqual(XML_RESULT, xml);
}