void () { getDomManager().registerFileDescription(new DomFileDescription<>(MyFooElement.class, "a", "foons") { @Override protected void initializeFileDescription() { super.initializeFileDescription(); registerNamespacePolicy("foo", "foons"); } }, getTestRootDisposable()); final XmlFile psiFile = createXmlFile("<f:a xmlns:f=\"foons\"/>"); final DomFileElementImpl<MyFooElement> element = getDomManager().getFileElement(psiFile, MyFooElement.class); assertNotNull(element); final MyFooElement root = element.getRootElement(); assertNotNull(root); assertSame(psiFile.getDocument().getRootTag(), root.getXmlElement()); }