void (boolean intentionAvailable) { loadToPsiFile(getTestName(false) + ".java"); ModCommandAction intentionAction = getAction(); boolean isActuallyAvailable = intentionAction.getPresentation(myFixture.getActionContext()) != null; assertEquals("Intention \"" + intentionAction.getFamilyName() + "\" was not available at caret", intentionAvailable, isActuallyAvailable); if (isActuallyAvailable) { myFixture.launchAction(intentionAction.asIntention()); } assertTrue("Intention \"" + intentionAction.getFamilyName() + "\" was not properly invoked", wasInvocationSuccessful()); }