void () { final String url = "http://java.sun.com/dtd/preferences.dtd"; assertEquals(url, ExternalResourceManager.getInstance().getResourceLocation(url, getProject())); myFixture.configureByText(XmlFileType.INSTANCE, "<!DOCTYPE images SYSTEM \"http://java.sun.com/dtd/prefer<caret>ences.dtd\">"); invokeFetchIntention(url); String location = ExternalResourceManager.getInstance().getResourceLocation(url, getProject()); assertNotSame(url, location); assertTrue(location.endsWith("preferences.dtd")); // no ".xml" suffix added ApplicationManager.getApplication().runWriteAction(() -> ExternalResourceManager.getInstance().removeResource(url)); }