void () { PsiReference ref = findReferenceAtCaret("method/" + getTestName(false) + ".java"); // just assume this is called by some highlighting inspection/intention/pass before the resolve myFixture.findClass("NN").getAllMethods(); PsiElement target = ref.resolve(); assertInstanceOf(target, PsiMethod.class); }