@Test
public void testIndexerAll() throws Exception {

  Privilege indexerAll = create(new KeyValue("indexer", ALL));
  Privilege indexer1 = create(new KeyValue("indexer", "ind1"));
  assertTrue(indexerAll.implies(indexer1));
  assertTrue(indexer1.implies(indexerAll));
  Privilege allWrite =
    create(new KeyValue("indexer", ALL), new KeyValue("action", "write"));
  Privilege allRead =
    create(new KeyValue("indexer", ALL), new KeyValue("action", "read"));
  Privilege ind1Write =
    create(new KeyValue("indexer", "ind1"), new KeyValue("action", "write"));
  Privilege ind1Read =
    create(new KeyValue("indexer", "ind1"), new KeyValue("action", "read"));
  assertTrue(allWrite.implies(ind1Write));
  assertTrue(allRead.implies(ind1Read));
  assertTrue(ind1Write.implies(allWrite));
  assertTrue(ind1Read.implies(allRead));
  assertFalse(allWrite.implies(ind1Read));
  assertFalse(ind1Write.implies(ind1Read));
  assertFalse(allRead.implies(ind1Write));
  assertFalse(ind1Read.implies(allWrite));
  assertFalse(allWrite.implies(allRead));
  assertFalse(allRead.implies(allWrite));
  assertFalse(ind1Write.implies(ind1Read));
  assertFalse(ind1Read.implies(ind1Write));
  // test different length paths
  assertTrue(indexerAll.implies(allWrite));
  assertTrue(indexerAll.implies(allRead));
  assertTrue(indexerAll.implies(ind1Write));
  assertTrue(indexerAll.implies(ind1Read));
  assertFalse(allWrite.implies(indexerAll));
  assertFalse(allRead.implies(indexerAll));
  assertFalse(ind1Write.implies(indexerAll));
  assertFalse(ind1Read.implies(indexerAll));
}