void () { createDirectory("parent"); myDirToRename = createChildDirectory(myDir, DIR_TO_RENAME_NAME); createChildData(myDirToRename, "file.txt"); CommandProcessor.getInstance().executeCommand(myProject, () -> rename(myDirToRename, NEW_NAME), "Renaming", null); }