@org.junit.Test
public void testReader() throws Exception {
ExtensionPointRegistry extensionPointRegistry = new DefaultExtensionPointRegistry();
StAXHelper helper = StAXHelper.getInstance(extensionPointRegistry);
XMLStreamReader r1 = helper.createXMLStreamReader(new StringReader(xml));
XMLDocumentStreamReader r2 = new XMLDocumentStreamReader(r1);
XMLStreamReader2String t1 = new XMLStreamReader2String(extensionPointRegistry);
String result = t1.transform(r2, null);
System.out.println(result);
XMLStreamReader r3 = helper.createXMLStreamReader(new StringReader(xml));
r3.nextTag();
r3.nextTag();
Assert.assertEquals(XMLStreamConstants.START_ELEMENT, r3.getEventType());
Assert.assertEquals(new QName(null, "e2"), r3.getName());
XMLDocumentStreamReader r4 = new XMLDocumentStreamReader(r3);