System.setSecurityManager(new SecurityManager());
}
// Run test with AccessController.doPrivilege
Action dp = new Action("private/private.txt");
MorePermission mp = new MorePermission(dp, false);
LessPermission lp = new LessPermission(mp, true);
try {
mp.takeAction();
} catch (Exception e) {
// Verify the test result
assertTrue("It is not the security exception.",
(e instanceof java.security.AccessControlException));