void () { String className = "TestClass"; createClass(className); String contentBefore = getDocumentText(findFile(className, myRoot)); deleteClass(); for (int i = 0; i < 2; i++) { globalUndo(); assertFileExists(className, contentBefore); globalUndo(); assertFileDoesNotExist(className, myRoot); globalRedo(); assertFileExists(className, contentBefore); globalRedo(); assertFileDoesNotExist(className, myRoot); } }