void () { AccessModifier previous = myGlobalTool.highestModifier; myGlobalTool.highestModifier = AccessModifier.PUBLIC; try { doTest(getGlobalTestDir(), myTool); } finally { myGlobalTool.highestModifier = previous; } }