void () { String initial = getFirstEditor().getDocument().getText(); typeInText("a"); executeTransparently(() -> typeInText("b")); typeInText("c"); executeTransparently(() -> { }); typeInText("d"); String after = getFirstEditor().getDocument().getText(); undo(getFirstEditor()); checkEditorText(initial, getFirstEditor()); redo(getFirstEditor()); checkEditorText(after, getFirstEditor()); }