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