void () { @Language("JAVA") String text = """ interface AF<caret>oo{ AFoo IMPL = new AFoo(){}; boolean aaa(); }"""; myFixture.configureByText("a.java", text); PsiClass psiClass = (PsiClass)TargetElementUtil.findTargetElement(myFixture.getEditor(), TargetElementUtil.getInstance().getAllAccepted()); assert psiClass != null; final Collection<PsiElement> classes = getClassImplementations(psiClass); List<PsiElement> all = new ArrayList<>(); all.add(psiClass); all.addAll(classes); final ImplementationViewComponent component = createImplementationView(all); assertContent(component, new String[]{"AFoo", "Anonymous in IMPL in AFoo"}); }