void () { configureFromFileText("A.java", "class A {{ foo(\"java\"<caret>); }}"); int offset = getEditor().getCaretModel().getOffset(); assertInstanceOf(GotoDeclarationAction.findTargetElement(getProject(), getEditor(), offset - 1), PsiDirectory.class); assertNull(GotoDeclarationAction.findTargetElement(getProject(), getEditor(), offset)); }