void () { myFixture.addClass("package java.lang.constant; public interface ClassDesc {static ClassDesc of(String name) {return null;}}"); myFixture.configureByText("Main.java", "class Main {{java.lang.constant.ClassDesc.of(\"java.lang.Obj<caret>ect\");}}"); int offset = myFixture.getCaretOffset(); PsiReference reference = myFixture.getFile().findReferenceAt(offset); assertNotNull("No reference at the caret", reference); PsiElement element = reference.resolve(); assertTrue(element instanceof PsiClass); assertEquals(CommonClassNames.JAVA_LANG_OBJECT, ((PsiClass)element).getQualifiedName()); }