EditorImpl (@NotNull String text, int caretLineIndex, int caretColumnIndex, int expectedCaretPosition) { initText(text); final EditorImpl editor = (EditorImpl)getEditor(); editor.getCaretModel().getPrimaryCaret().moveToVisualPosition(new VisualPosition(caretLineIndex, caretColumnIndex)); assertEquals("unexpected position of dot of editor.getCaretModel().getPrimaryCaret()", expectedCaretPosition, editor.getCaretModel().getPrimaryCaret().getOffset()); // Initializing our custom a11y subsystem just to make sure that it doesn't break tests editor.getContentComponent().getAccessibleContext(); return editor; }