void (@NotNull final CodeInsightTestFixture fixture, @NonNls final String action, @NotNull final String before, @NotNull final String after) { fixture.configureByFile(before); List<IntentionAction> availableIntentions = fixture.getAvailableIntentions(); final IntentionAction intentionAction = findIntentionByText(availableIntentions, action); if (intentionAction == null) { PsiElement element = fixture.getFile().findElementAt(fixture.getCaretOffset()); Assert.fail("Action not found: " + action + " in place: " + element + " among " + availableIntentions); } fixture.launchAction(intentionAction); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); fixture.checkResultByFile(after, false); }