void () { setupLoadingFilter(); PsiClass throwable = myJavaFacade.findClass(CommonClassNames.JAVA_LANG_THROWABLE, GlobalSearchScope.allScope(myProject)); PsiClass[] inheritors = ClassInheritorsSearch.search(throwable, GlobalSearchScope.projectScope(myProject), true).toArray(PsiClass.EMPTY_ARRAY); assertEquals(1, inheritors.length); assertTrue(inheritors[0] instanceof PsiAnonymousClass); PsiAnonymousClass anonClass = (PsiAnonymousClass)inheritors[0]; PsiClassType baseClassRef = anonClass.getBaseClassType(); assertEquals("Throwable", baseClassRef.getPresentableText()); assertEquals(throwable, baseClassRef.resolve()); assertEquals(CommonClassNames.JAVA_LANG_THROWABLE, baseClassRef.getCanonicalText()); teardownLoadingFilter(); assertTrue(anonClass.getParent() instanceof PsiNewExpression); }