{
Policy p = Policy.getPolicy();
SimplePrincipal[] caller = {new SimplePrincipal("GetRole")};
ProtectionDomain pd = new ProtectionDomain(null, null, null, caller);
WebResourcePermission wrp = new WebResourcePermission("/excluded/x", "GET");
assertFalse("/excluded/x GET", p.implies(pd, wrp));
wrp = new WebResourcePermission("/excluded/x", "OPTIONS");
assertFalse("/excluded/x OPTIONS", p.implies(pd, wrp));
wrp = new WebResourcePermission("/excluded/x", "HEAD");
assertFalse("/excluded/x HEAD", p.implies(pd, wrp));
wrp = new WebResourcePermission("/excluded/x", "POST");
assertFalse("/excluded/x POST", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/", "GET");
assertFalse("/restricted/ GET", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/", "OPTIONS");
assertFalse("/restricted/ OPTIONS", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/", "HEAD");
assertFalse("/restricted/ HEAD", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/", "POST");
assertFalse("/restricted/ POST", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/get-only/excluded/x", "GET");
assertFalse("/restricted/get-only/excluded/x GET", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/get-only/excluded/x", "OPTIONS");
assertFalse("/restricted/get-only/excluded/x OPTIONS", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/get-only/excluded/x", "HEAD");
assertFalse("/restricted/get-only/excluded/x HEAD", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/get-only/excluded/x", "POST");
assertFalse("/restricted/get-only/excluded/x POST", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/post-only/excluded/x", "GET");
assertFalse("/restricted/post-only/excluded/x GET", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/post-only/excluded/x", "OPTIONS");
assertFalse("/restricted/post-only/excluded/x OPTIONS", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/post-only/excluded/x", "HEAD");
assertFalse("/restricted/post-only/excluded/x HEAD", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/post-only/excluded/x", "POST");
assertFalse("/restricted/post-only/excluded/x POST", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/any/excluded/x", "GET");
assertFalse("/restricted/any/excluded/x GET", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/any/excluded/x", "OPTIONS");
assertFalse("/restricted/any/excluded/x OPTIONS", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/any/excluded/x", "HEAD");
assertFalse("/restricted/any/excluded/x HEAD", p.implies(pd, wrp));
wrp = new WebResourcePermission("/restricted/any/excluded/x", "POST");
assertFalse("/restricted/any/excluded/x POST", p.implies(pd, wrp));
}