void (Editor editor, String textWithMarkup) { final Document document = new DocumentImpl(textWithMarkup); EditorTestUtil.CaretAndSelectionState caretAndSelectionState = EditorTestUtil.extractCaretAndSelectionMarkers(document); assertEquals(document.getCharsSequence().toString(), editor.getDocument().getText()); EditorTestUtil.verifyCaretAndSelectionState(editor, caretAndSelectionState); }