AbstractXMLStreamReader implements XMLStreamReader { @Override public int next() throws XMLStreamException { if (!hasNext()) { throw new IllegalStateException("No more events"); } event = queue.remove(); return event.getType(); } AbstractXMLStreamReader(T rootInfo);  AbstractXMLStreamReader(T rootInfo, Location locationProvider); @Override void require(int eventType, String namespaceURI, String localName); @Override String getElementText(); @Override boolean hasNext(); @Override int next(); @Override int nextTag(); @Override void close(); @Override boolean isStartElement(); @Override boolean isEndElement(); @Override boolean isCharacters(); @Override boolean isWhiteSpace(); @Override int getAttributeCount(); @Override QName getAttributeName(int index); @Override String getAttributeLocalName(int index); @Override String getAttributeValue(int index); @Override String getAttributePrefix(int index); @Override String getAttributeNamespace(int index); @Override String getAttributeType(int index); @Override boolean isAttributeSpecified(int index); @Override String getAttributeValue(String namespaceURI, String localName); @Override String getNamespaceURI(String prefix); @Override int getNamespaceCount(); @Override String getNamespacePrefix(int index); @Override String getNamespaceURI(int index); @Override NamespaceContext getNamespaceContext(); @Override int getEventType(); @Override Location getLocation(); @Override boolean hasText(); @Override String getText(); @Override char[] getTextCharacters(); @Override int getTextCharacters(int sourceStart, char[] target, int targetStart, int length); @Override int getTextStart(); @Override int getTextLength(); @Override boolean hasName(); @Override QName getName(); @Override String getLocalName(); @Override String getNamespaceURI(); @Override String getPrefix(); @Override String getVersion(); @Override String getEncoding(); @Override boolean isStandalone(); @Override boolean standaloneSet(); @Override String getCharacterEncodingScheme(); @Override String getPITarget(); @Override String getPIData(); @Override Object getProperty(String name); @Override String toString();  }
@Test(expected = XMLStreamException.class) public void testUnboundPrefix() throws XMLStreamException { String input = "<?xml version=\"1.0\"?><foo:alice></foo:alice>"; XMLStreamReader reader = new SimpleXMLStreamReader(new StringReader(input)); verify(reader, XMLStreamConstants.START_DOCUMENT, null, null); reader.next(); verify(reader, XMLStreamConstants.START_ELEMENT, "alice", null); }