void () { ExtensionPointName.create("com.intellij.codeInsight.unresolvedReferenceQuickFixProvider").getPoint().registerExtension(new MyVerySlowQuickFixProvider(), getTestRootDisposable()); @Language("JAVA") String text = """ package x; class MyClass { public MyClass var1; } """; ALLOW_UNRESOLVED_REFERENCE_QUICK_FIXES = false; regFixCalled.clear(); configureFromFileText("X.java", text); ALLOW_UNRESOLVED_REFERENCE_QUICK_FIXES = true; DaemonRespondToChangesTest.useAnnotatorsIn(JavaLanguage.INSTANCE, new DaemonRespondToChangesTest.MyRecordingAnnotator[]{ new MyClassAnnotator()}, ()->{ getEditor().getCaretModel().moveToOffset(getEditor().getDocument().getText().indexOf("MyClass var1")); DaemonCodeAnalyzer.getInstance(getProject()).restart(); List<HighlightInfo> errors = highlightErrors(); assertOneElement(errors); CodeInsightTestFixtureImpl.waitForUnresolvedReferencesQuickFixesUnderCaret(getFile(), getEditor()); UIUtil.dispatchAllInvocationEvents(); assertNotEmpty(regFixCalled); }); }