void (String text) { Document checkDocument = new DocumentImpl(text); InlayHintsChecker checker = new InlayHintsChecker(this); CaretAndInlaysInfo inlaysAndCaretInfo = checker.extractInlaysAndCaretInfo(checkDocument); checkResult(checkDocument.getText()); checker.verifyInlaysAndCaretInfo(inlaysAndCaretInfo, text); }