@Test
public void testLists() {

    Permission p1, p2, p3;
    p1 = new Permission("one,two");
    p2 = new Permission("one");
    assertTrue(p1.implies(p2));
    assertFalse(p2.implies(p1));
    p1 = new Permission("one,two,three");
    p2 = new Permission("one,three");
    assertTrue(p1.implies(p2));
    assertFalse(p2.implies(p1));
    p1 = new Permission("one,two:one,two,three");
    p2 = new Permission("one:three");
    p3 = new Permission("one:two,three");
    assertTrue(p1.implies(p2));
    assertFalse(p2.implies(p1));
    assertTrue(p1.implies(p3));
    assertFalse(p2.implies(p3));
    assertTrue(p3.implies(p2));
    p1 = new Permission("one,two,three:one,two,three:one,two");
    p2 = new Permission("one:three:two");
    assertTrue(p1.implies(p2));
    assertFalse(p2.implies(p1));
    p1 = new Permission("one");
    p2 = new Permission("one:two,three,four");
    p3 = new Permission("one:two,three,four:five:six:seven");
    assertTrue(p1.implies(p2));
    assertTrue(p1.implies(p3));
    assertFalse(p2.implies(p1));
    assertFalse(p3.implies(p1));
    assertTrue(p2.implies(p3));
}