void () { @Language("JAVA") String text = """ abstract class AFoo{ abstract boolean a<caret>aa(); static class AFoo1 extends AFoo { @Override boolean aaa() { return false; } } static class AFoo3 extends AFoo { @Override boolean aaa() { return false; } } static class AFoo2 extends AFoo { @Override boolean aaa() { return false; } } \s }"""; myFixture.configureByText("a.java", text); PsiMethod psiMethod = (PsiMethod)TargetElementUtil.findTargetElement(myFixture.getEditor(), TargetElementUtil.getInstance().getAllAccepted()); assert psiMethod != null; final Collection<PsiMethod> methods = OverridingMethodsSearch.search(psiMethod).findAll(); List<PsiMethod> all = new ArrayList<>(); all.add(psiMethod); all.addAll(methods); //make sure they are in predefined order Collections.sort(all, Comparator.comparing(o -> o.getContainingClass().getQualifiedName())); final ImplementationViewComponent component = createImplementationView(all); assertContent(component, new String[]{"AFoo", "AFoo1 in AFoo", "AFoo2 in AFoo", "AFoo3 in AFoo"}); }