void (String text, String after, String name, boolean testOptimizeImports) { myFixture.configureByText("a.xml", text); myFixture.testHighlighting(); IntentionAction action = myFixture.getAvailableIntention(name); assertNotNull(name + " not found", action); myFixture.launchAction(action); myFixture.checkResult(after); myFixture.configureByText("a.xml", text); if (testOptimizeImports) { doOptimizeImportsTest(after); } }