void () { final VirtualFile[] f = new VirtualFile[1]; executeCommand(() -> { f[0] = createChildData(myRoot, "foo.txt"); setDocumentText(f[0], "foo"); }); executeCommand(() -> setDocumentText(f[0], "foofoo")); undo(getEditor(f[0])); undo(getEditor(f[0])); assertNull(myRoot.findChild("foo.txt")); globalRedo(); f[0] = myRoot.findChild("foo.txt"); assertNotNull(f[0]); assertEquals("foo", getDocumentText(f[0])); redo(getEditor(f[0])); assertEquals("foofoo", getDocumentText(f[0])); }