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