void () { initText(""); // Cannot set up text with singular surrogate characters directly runWriteCommand(() -> { getEditor().getDocument().setText(HIGH_SURROGATE + " " + LOW_SURROGATE); getEditor().getDocument().deleteString(1, 2); }); checkResultByText(SURROGATE_PAIR); assertEquals(new LogicalPosition(0, 1), getEditor().offsetToLogicalPosition(2)); }