@Test(expected = IOException.class) public void testCloseException() throws IOException, XMLStreamException { doThrow(new XMLStreamException()).when(xmlStreamWriter).close(); xmlRootNodeHandler.close(); }
@Override public void close() throws IOException { try { xmlStreamWriter.writeEndElement(); } catch (XMLStreamException e) { throw new IOException(e); } finally { try { xmlStreamWriter.close(); } catch (XMLStreamException e) { throw new IOException(e); } } }
XmlRootNodeHandler implements RootNodeHandler { @Override public void close() throws IOException { try { xmlStreamWriter.writeEndElement(); } catch (XMLStreamException e) { throw new IOException(e); } finally { try { xmlStreamWriter.close(); } catch (XMLStreamException e) { throw new IOException(e); } } } }
XmlRootNodeHandler implements RootNodeHandler { @Override public void close() throws IOException { try { xmlStreamWriter.writeEndElement(); } catch (XMLStreamException e) { throw new IOException(e); } finally { try { xmlStreamWriter.close(); } catch (XMLStreamException e) { throw new IOException(e); } } } XmlRootNodeHandler(OutputStream outputStream);  XmlRootNodeHandler(XMLStreamWriter xmlStreamWriter, XmlBxmlNodeVisitorFactory xmlBxmlNodeVisitorFactory); }
XmlRootNodeHandler implements RootNodeHandler { @Override public void close() throws IOException { try { xmlStreamWriter.writeEndElement(); } catch (XMLStreamException e) { throw new IOException(e); } finally { try { xmlStreamWriter.close(); } catch (XMLStreamException e) { throw new IOException(e); } } } XmlRootNodeHandler(OutputStream outputStream);  XmlRootNodeHandler(XMLStreamWriter xmlStreamWriter, XmlBxmlNodeVisitorFactory xmlBxmlNodeVisitorFactory); @Override void handle(RootNode rootNode); @Override void close(); }
XmlRootNodeHandler implements RootNodeHandler { @Override public void close() throws IOException { try { xmlStreamWriter.writeEndElement(); } catch (XMLStreamException e) { throw new IOException(e); } finally { try { xmlStreamWriter.close(); } catch (XMLStreamException e) { throw new IOException(e); } } } XmlRootNodeHandler(OutputStream outputStream);  XmlRootNodeHandler(XMLStreamWriter xmlStreamWriter, XmlBxmlNodeVisitorFactory xmlBxmlNodeVisitorFactory); @Override void handle(RootNode rootNode); @Override void close(); static final String EVENTS; }