Code example for AllPermission

0
		} 
    } 
     
    public void testImpliesCollection(){ 
         
        Permission ap = new AllPermission();
        Permission p = new DelegationPermission("\"AAA\" \"BBB\"");
        PermissionCollection pc = p.newPermissionCollection();
        assertFalse(pc.implies(ap));
        assertFalse(pc.implies(p));
        pc.add(p);
        assertTrue(pc.implies(p));
        assertFalse(pc.implies(null));
        DelegationPermission dp1 = new DelegationPermission("\"AAA\" \"BBB\"");
        assertTrue(dp1.implies(dp1));
        DelegationPermission dp2 = new DelegationPermission("\"BBB\" \"AAA\"");
        assertFalse(dp1.implies(dp2));
        assertFalse(dp1.implies(null));
        assertFalse(dp1.implies(new ServicePermission("aaa", "accept")));
    }