void () { PsiClass numberClass = myFixture.getJavaFacade().findClass("java.lang.Number", GlobalSearchScope.allScope(getProject())); assertTrue(String.valueOf(numberClass), numberClass instanceof ClsClassImpl); PsiClass n2 = (PsiClass)numberClass.getNavigationElement(); assertTrue(String.valueOf(n2), n2 instanceof PsiClassImpl); Collection<PsiClass> subClasses = DirectClassInheritorsSearch.search(n2, GlobalSearchScope.allScope(getProject())).findAll(); List<String> fqn = subClasses.stream().map(PsiClass::getQualifiedName).sorted().toList(); assertEquals(fqn.toString(), fqn.size(), new HashSet<>(fqn).size()); // no dups mean no Cls/Psi mixed Collection<PsiClass> allSubClasses = ClassInheritorsSearch.search(n2, GlobalSearchScope.allScope(getProject()), true).findAll(); List<String> allFqn = allSubClasses.stream().map(PsiClass::getQualifiedName).sorted().toList(); assertEquals(allFqn.toString(), allFqn.size(), new HashSet<>(allFqn).size()); }