void () { initText("hello<caret>"); JComponent component = getEditor().getContentComponent(); component.dispatchEvent(new InputMethodEvent(component, InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, new AttributedString("\u3145" /* ㅅ */).getIterator(), 0, TextHitInfo.afterOffset(0), TextHitInfo.afterOffset(-1))); component.dispatchEvent(new InputMethodEvent(component, InputMethodEvent.INPUT_METHOD_TEXT_CHANGED, new AttributedString("\u3146" /* ㅆ */).getIterator(), 0, TextHitInfo.afterOffset(0), TextHitInfo.afterOffset(-1))); checkResultByText("hello\u3146"); }