@Test
public void testNormalizeNonDefaultNamespace()
                        throws XMLStreamException {

    String input = "<app:a xmlns:app=\"http://www.deegree.org/app\">Hello</app:a>";
    XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader( new StringReader( input ) );
    XMLStreamUtils.skipStartDocument( reader );
    StringWriter output = new StringWriter();
    XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter( output );
    NamespaceBindings nsBindings = new NamespaceBindings();
    nsBindings.addNamespace( "", "http://www.deegree.org/app" );
    writer = new NamespaceNormalizingXMLStreamWriter( writer, nsBindings );
    XMLAdapter.writeElement( writer, reader );
    writer.close();
    assertEquals( "<a xmlns=\"http://www.deegree.org/app\">Hello</a>", output.toString() );
}