void () { XmlFile file = prepareFile("foo.xml"); ((PsiManagerEx)getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, myFixture.getTestRootDisposable()); DomFileElement<Foo> element = DomManager.getDomManager(getProject()).getFileElement(file, Foo.class); assertNotNull(element); GenericDomValue<String> id = element.getRootElement().getId(); assertEquals("foo", id.getValue()); }