void () { myFixture.configureByText("Foo.java", """ class Foo { String bar() { return "ba<caret>r.xml"; } \s }"""); assertNull(getInjectedReferences()); InjectLanguageAction.invokeImpl(getProject(), myFixture.getEditor(), myFixture.getFile(), new FileReferenceInjector()); PsiReference[] references = getInjectedReferences(); PsiReference reference = assertOneElement(references); assertTrue(reference instanceof FileReference); UnInjectLanguageAction.invokeImpl(getProject(), myFixture.getEditor(), myFixture.getFile()); assertNull(getInjectedReferences()); }