DelegatingXMLStreamWriter implements XMLStreamWriter { @Override public void setDefaultNamespace(String uri) throws XMLStreamException { writer.setDefaultNamespace(uri); } DelegatingXMLStreamWriter(XMLStreamWriter writer); @Override void writeStartElement(String localName); @Override void writeStartElement(String namespaceURI, String localName); @Override void writeStartElement(String prefix, String localName, String namespaceURI); @Override void writeEmptyElement(String namespaceURI, String localName); @Override void writeEmptyElement(String prefix, String localName, String namespaceURI); @Override void writeEmptyElement(String localName); @Override void writeEndElement(); @Override void writeEndDocument(); @Override void close(); @Override void flush(); @Override void writeAttribute(String localName, String value); @Override void writeAttribute(String prefix, String namespaceURI, String localName, String value); @Override void writeAttribute(String namespaceURI, String localName, String value); @Override void writeNamespace(String prefix, String namespaceURI); @Override void writeDefaultNamespace(String namespaceURI); @Override void writeComment(String data); @Override void writeProcessingInstruction(String target); @Override void writeProcessingInstruction(String target, String data); @Override void writeCData(String data); @Override void writeDTD(String dtd); @Override void writeEntityRef(String name); @Override void writeStartDocument(); @Override void writeStartDocument(String version); @Override void writeStartDocument(String encoding, String version); @Override void writeCharacters(String text); @Override void writeCharacters(char[] text, int start, int len); @Override String getPrefix(String uri); @Override void setPrefix(String prefix, String uri); @Override void setDefaultNamespace(String uri); @Override void setNamespaceContext(NamespaceContext context); @Override NamespaceContext getNamespaceContext(); @Override Object getProperty(String name);  }
@Test void testSetDefaultNamespace() throws XMLStreamException { writer.setDefaultNamespace(NAMESPACE_URI); verify(delegateMock).setDefaultNamespace(NAMESPACE_URI); }