void () { myFixture.configureByText("Test.java", """ /** outer **/ class Test { /** <caret>inner **/ }"""); PsiElement element = PsiTreeUtil.getParentOfType(myFixture.getFile().findElementAt(myFixture.getCaretOffset()), PsiDocComment.class, false); assertNotNull(element); String signature = FoldingPolicy.getSignature(element); if (signature != null) { assertEquals(element, FoldingPolicy.restoreBySignature(element.getContainingFile(), signature)); } }