GrDocReferenceElement (@NotNull String qName) { PsiFile file = createGroovyFileChecked("/** @see " + qName + " */"); PsiElement element = file.getFirstChild(); assert element instanceof GrDocComment; GrDocTag tag = PsiTreeUtil.getChildOfType(element, GrDocTag.class); assert tag != null : "Doc tag points to null"; return PsiTreeUtil.getChildOfType(tag, GrDocReferenceElement.class); }