void () { Map<String, PsiElement> marks = loadTest(); PsiElement referenceElement = marks.get("<the_ref>"); final PyDocStringOwner docStringOwner = (PyDocStringOwner)referenceElement.getParent().getReference().resolve(); checkByHTML(myProvider.generateDoc(docStringOwner, referenceElement)); }