@@ -0,0 +1,1823 @@
+/**%0A *%0A * Copyright 2021 Florian Schmaus%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.jivesoftware.smackx.jingle.element;%0A%0Aimport static org.junit.jupiter.api.Assertions.assertEquals;%0A%0Aimport org.jivesoftware.smack.packet.StreamOpen;%0A%0Aimport org.junit.jupiter.api.Test;%0A%0Apublic class JingleTest %7B%0A%0A    @Test%0A    public void noRedundantNamespaceTest() %7B%0A        Jingle.Builder jingleBuilder = Jingle.builder(%22test-id%22);%0A        jingleBuilder.setSessionId(%22MySession%22);%0A        jingleBuilder.setAction(JingleAction.content_accept);%0A%0A        JingleContent.Builder jingleContentBuilder = JingleContent.getBuilder();%0A        jingleContentBuilder.setName(%22Hello world%22);%0A        jingleContentBuilder.setCreator(JingleContent.Creator.initiator);%0A%0A        jingleBuilder.addJingleContent(jingleContentBuilder.build());%0A        Jingle iq = jingleBuilder.build();%0A%0A        String actualXml = iq.toXML(StreamOpen.CLIENT_NAMESPACE).toString();%0A        String expectedXml%0A                        = %22%3Ciq id='test-id' type='set'%3E%22%0A                        + %22%3Cjingle xmlns='urn:xmpp:jingle:1' action='content-accept' sid='MySession'%3E%22%0A                        + %22%3Ccontent creator='initiator' name='Hello world'/%3E%22%0A                        + %22%3C/jingle%3E%3C/iq%3E%22;%0A        assertEquals(expectedXml, actualXml);%0A    %7D%0A%7D%0A

Add unit test to check that there are no redundant namespaces