### Question:
W3CDOMStreamReader extends AbstractDOMStreamReader<Node, Node> { @Override public String getElementText() throws XMLStreamException { String result = DOMUtils.getRawContent(content); ElementFrame<Node, Node> frame = getCurrentFrame(); frame.ended = true; currentEvent = END_ELEMENT; endElement(); return result != null ? result : ""; } W3CDOMStreamReader(Element element);  W3CDOMStreamReader(Element element, String systemId);  W3CDOMStreamReader(Document doc);  W3CDOMStreamReader(DocumentFragment docfrag); Document getDocument(); String getSystemId(); final Node getCurrentNode(); final Element getCurrentElement(); @Override String getElementText(); @Override String getNamespaceURI(String prefix); String getAttributeValue(String ns, String local); int getAttributeCount(); QName getAttributeName(int i); String getAttributeNamespace(int i); String getAttributeLocalName(int i); String getAttributePrefix(int i); String getAttributeType(int i); String getAttributeValue(int i); boolean isAttributeSpecified(int i); int getNamespaceCount(); String getNamespacePrefix(int i); String getNamespaceURI(int i); NamespaceContext getNamespaceContext(); String getText(); char[] getTextCharacters(); int getTextStart(); int getTextLength(); String getEncoding(); QName getName(); String getLocalName(); String getNamespaceURI(); String getPrefix(); String getPITarget(); String getPIData(); Location getLocation(); String toString();  }### Answer:
@Test public void testTopLevelText() throws Exception { ByteArrayInputStream is = new ByteArrayInputStream( "<t:Test xmlns:t=\"http: .getBytes()); Document doc = StaxUtils.read(is); Element e = doc.getDocumentElement(); XMLStreamReader reader = StaxUtils.createXMLStreamReader(e); String value = reader.getElementText(); assertEquals("gorilla", value); }
@Test public void testTopLevelText() throws Exception { ByteArrayInputStream is = new ByteArrayInputStream( "<t:Test xmlns:t=\"http: .getBytes("utf-8")); Document doc = DOMUtils.readXml(is); Element e = doc.getDocumentElement(); XMLStreamReader reader = StaxUtils.createXMLStreamReader(e); String value = reader.getElementText(); assertEquals("gorilla", value); }