void () { configure(); PsiDirectory element = (PsiDirectory)GotoDeclarationAction.findTargetElement(getProject(), getEditor(), getEditor().getCaretModel().getOffset()); assertEquals("java.lang", JavaDirectoryService.getInstance().getPackage(element).getQualifiedName()); }