void (boolean isAvailable) { IntentionAction action = new SealClassFromPermitsListAction( PsiTreeUtil.getNonStrictParentOfType(myFixture.getElementAtCaret(), PsiClass.class)).asIntention(); if (isAvailable) { assertTrue(action.isAvailable(getProject(), getEditor(), getFile())); myFixture.launchAction(action); NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); } else { assertFalse(action.isAvailable(getProject(), getEditor(), getFile())); } }