void () { boolean previous = myTool.ignoreWhenRefactoringIsComplicated; try { myTool.ignoreWhenRefactoringIsComplicated = false; doTest(getTestDir(), myTool, false, true); } finally { myTool.ignoreWhenRefactoringIsComplicated = previous; } }