void () { configureByFile(BASE_PATH + "/" + getTestName(false) + ".java"); final int offset = getEditor().getCaretModel().getOffset(); final PsiElement[] elements = GotoDeclarationAction.findAllTargetElements(getProject(), getEditor(), offset); assertSize(1, elements); PsiElement element = elements[0]; assertInstanceOf(element, PsiClass.class); assertEquals(CommonClassNames.JAVA_LANG_STRING, ((PsiClass)element).getQualifiedName()); }