void () { final String url = "https://community.rti.com/schema/6.0.0/rti_dds_profiles.xsd"; assertEquals(url, ExternalResourceManager.getInstance().getResourceLocation(url, getProject())); myFixture.configureByText(XmlFileType.INSTANCE, """ <?xml version="1.0" encoding="UTF-8" ?> <dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://community.rti.com/schema/6.0.0/rti_dd<caret>s_profiles.xsd"> <types/> <domain_library name="xxx"/> <domain_participant_library name="ffff"/> </dds>"""); invokeFetchIntention(url); myFixture.testHighlighting(); XmlFile file = (XmlFile)myFixture.getFile(); XmlAttributeDescriptor descriptor = file.getRootTag().getSubTags()[1].getAttribute("name").getDescriptor(); PsiFile containingFile = descriptor.getDeclaration().getContainingFile(); assertNotNull(containingFile.getParent()); assertEquals("definitions", containingFile.getParent().getName()); ApplicationManager.getApplication().runWriteAction(() -> ExternalResourceManager.getInstance().removeResource(url)); }