assertTrue(test2.implies(test1));
}
public void testImpliesWildcard() throws Exception
{
JndiPermission test1 = new JndiPermission("1/2/3", JndiPermission.ALL_ACTION);
JndiPermission test2 = new JndiPermission("1/2/*", JndiPermission.ALL_ACTION);
assertTrue(test2.implies(test1));
test2 = new JndiPermission("1/2/3/*", JndiPermission.ALL_ACTION);
assertFalse(test2.implies(test1));
test2 = new JndiPermission("1/4/*", JndiPermission.ALL_ACTION);
assertFalse(test2.implies(test1));
test2 = new JndiPermission("1/*", JndiPermission.ALL_ACTION);
assertFalse(test2.implies(test1));
/*
test2 = new JndiPermission("*", JndiPermission.ALL_ACTION);
assertFalse(test2.implies(test1));
test1 = new JndiPermission("1", JndiPermission.ALL_ACTION);
assertTrue(test2.implies(test1));
*/
test1 = new JndiPermission("1/2/34", JndiPermission.ALL_ACTION);
test2 = new JndiPermission("1/2/3*", JndiPermission.ALL_ACTION);
assertFalse(test2.implies(test1));
}