@Test
public void testWriteElement()
                        throws XMLStreamException {

    StringWriter stringWriter = new StringWriter();
    XMLOutputFactory factory = XMLOutputFactory.newInstance();
    factory.setProperty( XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE );
    XMLStreamWriter writer = new IndentingXMLStreamWriter( factory.createXMLStreamWriter( stringWriter ) );
    adapter.getRootElement().serializeAndConsume( writer );
}