void () { @Language("JAVA") @SuppressWarnings("ALL") String fileText = "public abstract class Hello {\n" + " abstract void foo();\n" + "\n" + " class A {\n" + " {\n" + " fo<caret>o();\n" + " }\n" + " }\n" + " class Hello1 extends Hello {\n" + " void foo() {}\n" + " }\n" + " class Hello2 extends Hello {\n" + " void foo() {}\n" + " }\n" + "}"; PsiFile file = myFixture.addFileToProject("Foo.java", fileText); myFixture.configureFromExistingVirtualFile(file.getVirtualFile()); final PsiElement[] impls = getTargets(file); assertEquals(2, impls.length); }