// Do not include certain default namespace on the root-element ('stream') or stanza level. This makes stanzas re-usable between, for example, c2s and s2s.
finalStringinput="<stream:stream to='example.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'><message from='juliet@example.com' to='romeo@example.net' xml:lang='en'><body>Art thou not Romeo, and a Montague?</body></message></stream:stream>";
finalStringinput="<stream:stream to='example.com' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'><message xmlns='jabber:client' from='juliet@example.com' to='romeo@example.net' xml:lang='en'><body>Art thou not Romeo, and a Montague?</body></message></stream:stream>";
Assert.assertFalse("'jabber:client' should not occur before 'something:else'",result.asXML().substring(0,result.asXML().indexOf("something:else")).contains("jabber:client"));
Assert.assertTrue("'jabber:client' should occur after 'something:else'",result.asXML().substring(result.asXML().indexOf("something:else")).contains("jabber:client"));
}
/**
* Check that the 'jabber:client' default namespace declaration is explicitly _not_ stripped from a child element
* of a stanza.
*
* Openfire strips this namespace (among others) to make the resulting XML 're-usable', in context of the
* implementation note in RFC 6120, section 4.8.3.
*
* @see <a href="https://issues.igniterealtime.org/browse/OF-1335">Issue OF-1335: Forwarded messages rewritten to default namespace over S2S</a>
Assert.assertFalse("'jabber:client' should not occur before 'something:else'",result.asXML().substring(0,result.asXML().indexOf("something:else")).contains("jabber:client"));
Assert.assertTrue("'jabber:client' should occur after 'something:else'",result.asXML().substring(result.asXML().indexOf("something:else")).contains("jabber:client"));