void () { ApplicationManager.getApplication().runWriteAction(() -> { final String text1 = "/** @param <code"; String text = text1 + " */"; initDocument(text); myHighlighter.createIterator(text1.length()); myDocument.insertString(text1.length(), ">"); }); // assertEquals(JavaHighlightingLexer.DOC_TOKEN_SHIFT + JavaDocTokenType.DOC_TAG_NAME, iterator.getTokenType()); }