void () { myFixture.configureByText("Test.java", """ class Test { void f(Iterable<String> it) { it<caret>; } }"""); IntentionAction action = myFixture.findSingleIntention("Iterate over Iterable<String>"); myFixture.type("\b\b"); PsiDocumentManager.getInstance(getProject()).commitDocument(myFixture.getFile().getViewProvider().getDocument()); // should not be available anymore assertPreviewText(action, null); }