void () { final MyElement root = createElement("<a xmlns=\"foo\"/>", MyElement.class); registerNamespacePolicies(root); final MyFooElement element = root.addFooElement(); final MyElement child = element.addChild(); final XmlTag childTag = child.getXmlTag(); assertEquals("child", childTag.getName()); assertEquals("foo", childTag.getNamespace()); assertEquals("", childTag.getNamespacePrefix()); assertNull(childTag.getAttributeValue("xmlns")); assertEquals("foo", element.getXmlElementNamespaceKey()); assertNull(child.getXmlElementNamespaceKey()); }