Code example for AccessControlException

0
                new AccessControlException(null, null),
                new AccessControlException("string2", allperms) };
    } 
 
    public void assertDeserialized(Serializable oref, Serializable otest) {
 
        // common checks 
        THROWABLE_COMPARATOR.assertDeserialized(oref, otest);
 
        // class specific checks 
        AccessControlException ref = (AccessControlException) oref;
        AccessControlException test = (AccessControlException) otest;
        Permission p = ref.getPermission();
        if (p == null) {
            assertNull(test.getPermission());
        } else { 
            assertEquals(p, test.getPermission());
        } 
    } 
}