void () { myFixture.addClass("package bar; public class FooBar {}"); PsiFile file = myFixture.configureByText("a.java", """ package foo; public class Foo { Foo<caret>Bar fb; //class FooBar {} } """); List<IntentionAction> intentions = myFixture.filterAvailableIntentions("Import class"); assertFalse(intentions.isEmpty()); int commentOffset = file.getText().indexOf("//"); myFixture.getEditor().getCaretModel().moveToOffset(commentOffset); LightPlatformCodeInsightTestCase.delete(myFixture.getEditor(), myFixture.getProject()); LightPlatformCodeInsightTestCase.delete(myFixture.getEditor(), myFixture.getProject()); PsiDocumentManager.getInstance(myFixture.getProject()).commitAllDocuments(); assertFalse(intentions.get(0).isAvailable(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile())); }