void () { configure(); final int offset = getEditor().getCaretModel().getOffset(); final PsiElement[] elements = GotoDeclarationAction.findAllTargetElements(getProject(), getEditor(), offset); assertEquals(Arrays.asList(elements).toString(), 0, elements.length); final TargetElementUtil elementUtilBase = TargetElementUtil.getInstance(); final PsiReference reference = getFile().findReferenceAt(offset); assertNotNull(reference); final Collection<PsiElement> candidates = elementUtilBase.getTargetCandidates(reference); assertEquals(candidates.toString(), 2, candidates.size()); }