void () { final MyElement element = createElement("<a/>", MyElement.class); registerNamespacePolicies(element); final XmlTag fooChildTag = element.getFooChild().ensureTagExists(); assertEquals("foo-child", fooChildTag.getName()); assertEquals("foo", fooChildTag.getNamespace()); assertEquals("", fooChildTag.getNamespacePrefix()); assertEquals("foo", fooChildTag.getAttributeValue("xmlns")); final XmlTag barChildTag = element.getBarChild().ensureTagExists(); assertEquals("bar-child", barChildTag.getName()); assertEquals("bar", barChildTag.getNamespace()); assertEquals("", barChildTag.getNamespacePrefix()); assertEquals("bar", barChildTag.getAttributeValue("xmlns")); }