void () { initText("hello<caret>"); JComponent component = getEditor().getContentComponent(); component.dispatchEvent(new InputMethodEvent(component, InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, new AttributedString("\u3145" /* ㅅ */).getIterator(), 0, null, null)); component.dispatchEvent(new InputMethodEvent(component, InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, new AttributedString("\u3146" /* ㅆ */).getIterator(), 0, null, null)); mouse().clickAtXY(0, getEditor().getLineHeight() / 2); checkResultByText("<caret>hello\u3146"); }