void () { String initial = getFirstEditor().getDocument().getText(); executeCommand(() -> typeInText("a")); executeTransparently(() -> typeInText("1")); String afterTransparent = getFirstEditor().getDocument().getText(); undo(getFirstEditor()); checkEditorText(initial, getFirstEditor()); redo(getFirstEditor()); checkEditorText(afterTransparent, getFirstEditor()); }