@Override
    public StringBuilder toXML(XmlEnvironment enclosingXmlEnvironment) {
        // This is only the potential length, since the actual length depends on the given XmlEnvironment.
        int potentialLength = length();
        StringBuilder res = new StringBuilder(potentialLength);

        appendXmlTo(csq -> res.append(csq), enclosingXmlEnvironment);

        return res;
    }
@Test
    public void equalInnerNamespaceTest() {
        StandardExtensionElement innerOne = StandardExtensionElement.builder("inner", "inner-namespace").build();
        StandardExtensionElement innerTwo = StandardExtensionElement.builder("inner", "inner-namespace").build();

        StandardExtensionElement outer = StandardExtensionElement.builder("outer", "outer-namespace").addElement(
                        innerOne).addElement(innerTwo).build();

        String expectedXml = "<outer xmlns='outer-namespace'><inner xmlns='inner-namespace'></inner><inner xmlns='inner-namespace'></inner></outer>";
        XmlStringBuilder actualXml = outer.toXML(XmlEnvironment.EMPTY);

        XmlAssertUtil.assertXmlSimilar(expectedXml, actualXml);

        StringBuilder actualXmlTwo = actualXml.toXML(XmlEnvironment.EMPTY);

        XmlAssertUtil.assertXmlSimilar(expectedXml, actualXmlTwo);
    }