StringReader reader = new StringReader(testString);
XMLStreamReader xmlStreamReader
= new WrappedTextNodeStreamReader(wrapperElementName, reader, chunkSize);
OMElement element = OMXMLBuilderFactory.createStAXOMBuilder(xmlStreamReader).getDocumentElement();
StringWriter writer = new StringWriter();
element.serializeAndConsume(writer);
assertXMLEqual(expectedXML, writer.toString());
}
public void testShortStringUsingSerializeAndConsume() throws Exception {
String testString = "This is a test string for WrappedTextNodeStreamReader";