IndentingXMLStreamWriter extends DelegatingXMLStreamWriter { @Override public void writeEndElement() throws XMLStreamException { onEndElement(); super.writeEndElement(); } 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 testWriteEndElement() throws XMLStreamException { writer.writeEndElement(); delegateInOrder.verify(delegateMock).writeEndElement(); delegateInOrder.verifyNoMoreInteractions(); }