IndentingXMLStreamWriter extends DelegatingXMLStreamWriter { @Override public void writeStartElement(String localName) throws XMLStreamException { onStartElement(); super.writeStartElement(localName); } IndentingXMLStreamWriter(XMLStreamWriter writer); @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 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 writeCharacters(String text); @Override void writeCharacters(char[] text, int start, int len); @Override void writeCData(String data);  }
@Test void testWriteStartElementString() throws XMLStreamException { writer.writeStartElement(LOCAL_NAME); delegateInOrder.verify(delegateMock).writeStartElement(LOCAL_NAME); delegateInOrder.verifyNoMoreInteractions(); }
@Test void testWriteStartElementStringString() throws XMLStreamException { writer.writeStartElement(NAMESPACE_URI, LOCAL_NAME); delegateInOrder.verify(delegateMock).writeStartElement(NAMESPACE_URI, LOCAL_NAME); delegateInOrder.verifyNoMoreInteractions(); }
@Test void testWriteStartElementStringStringString() throws XMLStreamException { writer.writeStartElement(NAMESPACE_URI, LOCAL_NAME, NAMESPACE_URI); delegateInOrder.verify(delegateMock).writeStartElement(NAMESPACE_URI, LOCAL_NAME, NAMESPACE_URI); delegateInOrder.verifyNoMoreInteractions(); }