void () { WriteCommandAction.runWriteCommandAction(getProject(), new Runnable() { @Override public void run() { try { VirtualFile dir1 = myRoot.createChildDirectory(this, "dir1"); VirtualFile dir2 = myRoot.createChildDirectory(this, "dir2"); dir1.createChildData(this, "f.java"); dir1.move(this, dir2); } catch (IOException e) { throw new RuntimeException(e); } } }); PlatformTestUtil.assertTiming("", 2000, 1, () -> { redoUndo(); redoUndo(); redoUndo(); }); }