void () { XmlFile file = (XmlFile)myFixture.configureByText(XmlFileType.INSTANCE, "<a b=\" &<caret>\"/>"); PsiElement element = file.getRootTag().getAttribute("b").getValueElement(); LanguageInjectionSupport support = TemporaryPlacesRegistry.getInstance(getProject()).getLanguageInjectionSupport(); assertTrue(support.addInjectionInPlace(PlainTextLanguage.INSTANCE, (PsiLanguageInjectionHost)element)); IntentionAction intention = myFixture.getAvailableIntention(XmlAnalysisBundle.message("xml.quickfix.escape.ampersand")); assertNotNull(intention); ShowIntentionActionsHandler.chooseActionAndInvoke(file, myFixture.getEditor(), intention, ""); myFixture.checkResult("<a b=\" &amp;\"/>"); }