### Question:
XmlStreamWriterAdapter implements XMLStreamWriter { @Override public void writeDefaultNamespace(String namespaceURI) { delegate.writeDefaultNamespace(namespaceURI); } XmlStreamWriterAdapter(XmlStreamWriter delegate); @Override void close(); @Override void flush(); @Override String getPrefix(String uri); @Override void setDefaultNamespace(String uri); @Override void setPrefix(String prefix, String uri); @Override void writeAttribute(String localName, String value); @Override void writeAttribute(String namespaceURI, String localName, String value); @Override void writeAttribute(String prefix, String namespaceURI, String localName, String value); @Override void writeCData(String data); @Override void writeCharacters(String text); @Override void writeCharacters(char[] text, int start, int len); @Override void writeComment(String data); @Override void writeDTD(String dtd); @Override void writeDefaultNamespace(String namespaceURI); @Override void writeEmptyElement(String localName); @Override void writeEmptyElement(String namespaceURI, String localName); @Override void writeEmptyElement(String prefix, String localName, String namespaceURI); @Override void writeEndDocument(); @Override void writeEndElement(); @Override void writeEntityRef(String name); @Override void writeNamespace(String prefix, String namespaceURI); @Override void writeProcessingInstruction(String target); @Override void writeProcessingInstruction(String target, String data); @Override void writeStartDocument(); @Override void writeStartDocument(String version); @Override void writeStartDocument(String encoding, String version); @Override void writeStartElement(String localName); @Override void writeStartElement(String namespaceURI, String localName); @Override void writeStartElement(String prefix, String localName, String namespaceURI); @Override NamespaceContext getNamespaceContext(); @Override Object getProperty(String name); @Override void setNamespaceContext(NamespaceContext context);  }### Answer:
@Test public void writeDefaultNamespace() { adapter.writeStartDocument(); adapter.writeStartElement("uri:urn:a", "test"); adapter.writeDefaultNamespace("uri:urn:a"); adapter.writeCharacters("test it"); adapter.writeEndElement(); adapter.writeEndDocument(); adapter.close(); assertXml("<?xml version='1.0' ?><test xmlns=\"uri:urn:a\">test it</test>"); }