void () { myFixture.addClass("package test; public class A {}"); PsiClass aClass = myFixture.addClass("public class test {}"); doTest(); assertNull(ProgressManager.getInstance().runProcess(() -> ReferencesSearch.search(aClass).findFirst(), new EmptyProgressIndicator())); }