void () { LightVirtualFile file = new LightVirtualFile(getTestName(false)); Document d1 = EditorFactory.getInstance().createDocument(""); Document d2 = EditorFactory.getInstance().createDocument(""); FileEditor fileEditor = new IncorrectFileEditor(file, d1, d2); runWithCurrentEditor(fileEditor, () -> { WriteAction.run(() -> { CommandProcessor.getInstance().runUndoTransparentAction(() -> d1.insertString(0, " ")); CommandProcessor.getInstance().runUndoTransparentAction(() -> d2.insertString(0, " ")); }); undo(); }); assertEquals("", d1.getText()); assertEquals("", d2.getText()); }