}
public void testReadingAsString() throws Exception {
MutableXMLStreamBuffer buffer = createBuffer();
XMLStreamReaderEx reader = (XMLStreamReaderEx)buffer.readAsXMLStreamReader();
assertEquals(XMLStreamConstants.START_DOCUMENT,reader.getEventType());
assertEquals(XMLStreamConstants.START_ELEMENT,reader.next());
verifyTag(reader,null,"foo");
assertEquals(XMLStreamConstants.CHARACTERS,reader.next());
assertEquals(base64EncodedString,reader.getText());
assertEquals(XMLStreamConstants.END_ELEMENT,reader.next());
verifyTag(reader,null,"foo");
}