void () { JBTextArea area = new JBTextArea("text \u00df text"); TextComponentEditorImpl editor = new TextComponentEditorImpl(getProject(), area); area.select(0, 4); executeAction(IdeActions.ACTION_EDITOR_TOGGLE_CASE, editor); assertEquals("TEXT ß text", area.getText()); assertEquals(0, area.getSelectionStart()); assertEquals(4, area.getSelectionEnd()); area.select(5, 6); executeAction(IdeActions.ACTION_EDITOR_TOGGLE_CASE, editor); assertEquals("TEXT SS text", area.getText()); assertEquals(5, area.getSelectionStart()); assertEquals(7, area.getSelectionEnd()); }