}
public void testImpliesPermission() throws Exception
{
String nullActions = null;
WebResourcePermission p0 = new WebResourcePermission("/", nullActions);
WebResourcePermission p1 = new WebResourcePermission("/", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/", "");
assertTrue("p0.implies(p1)", p0.implies(p1));
p1 = new WebResourcePermission("", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
String[] emtpy = {};
p0 = new WebResourcePermission("/", emtpy);
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/*", nullActions);
p1 = new WebResourcePermission("/any", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/*", "GET");
p1 = new WebResourcePermission("/any", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/any/*", "GET");
p1 = new WebResourcePermission("/any", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
p1 = new WebResourcePermission("/any/", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/any/more/*", "GET");
p1 = new WebResourcePermission("/any/more/andsome", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("*.jsp", "POST,GET");
p1 = new WebResourcePermission("/snoop.jsp", "GET,POST");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("*.jsp", "POST,GET,TRACE");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/snoop.jsp", "POST,GET,TRACE");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/:/secured.jsp:/unchecked.jsp:/excluded.jsp:/sslprotected.jsp", "POST,GET");
p1 = new WebResourcePermission("/:/secured.jsp:/excluded.jsp:/sslprotected.jsp:/unchecked.jsp", "GET,POST");
assertTrue("p0.implies(p1)", p0.implies(p1));
p0 = new WebResourcePermission("/restricted/*", "DELETE,GET,HEAD,POST,PUT");
p1 = new WebResourcePermission("/restricted/SecureServlet", "GET");
assertTrue("p0.implies(p1)", p0.implies(p1));
}