void () { final int offset = myFixture.getEditor().getCaretModel().getCurrentCaret().getOffset(); final PsiElement atOffset = PsiTreeUtil.findElementOfClassAtOffset(myFixture.getFile(), offset, PsiElement.class, false); Assert.assertNotNull(atOffset); PsiReference position = myFixture.getFile().findReferenceAt(offset); Assert.assertNotNull(position); PsiElement resolve = position.resolve(); Assert.assertNotNull(resolve); Assert.assertEquals(""" { "type": "string", "enum": ["one", "two"] }""", resolve.getText()); }