Hive hive = factory.createHive();
assertTrue(hive.containsPrincipal(new EverybodyPrincipal()));
assertTrue(hive.containsPrincipal(new SimplePrincipal("test1")));
assertTrue(hive.containsPrincipal(new SimplePrincipal("test2")));
assertTrue(hive.containsPrincipal(new SimplePrincipal("test6")));
assertTrue(hive.containsPermission(new TestPermission("A", "inherit, render")));
assertTrue(hive.containsPermission(new TestPermission("A", "enable")));
assertTrue(hive.containsPermission(new TestPermission("1.A", "inherit, render")));
assertTrue(hive.containsPermission(new TestPermission("1.A", "enable")));
assertFalse(hive.containsPermission(new TestPermission("2.A", "inherit, render")));
assertFalse(hive.containsPermission(new TestPermission("2.A", "enable")));
assertTrue(hive.containsPermission(new TestPermission("2.B", "inherit, render, enable")));
assertTrue(hive.containsPermission(new TestPermission("2.B", "enable")));
assertTrue(hive.containsPermission(new TestPermission("2.C", "render, enable")));
assertTrue(hive.containsPermission(new TestPermission("2.C.1", "enable")));
assertTrue(hive.containsPermission(new TestPermission("7.A", "inherit, render")));
assertTrue(hive.containsPermission(new TestPermission("7.A", "enable")));
assertTrue(hive.containsPermission(new TestPermission("7.B", "inherit, render, enable")));
assertTrue(hive.containsPermission(new TestPermission("7.B", "enable")));
assertTrue(hive.containsPermission(new TestPermission("7.C", "render, enable")));
assertTrue(hive.containsPermission(new TestPermission("7.C.1", "enable")));
assertFalse(hive.containsPermission(new TestPermission("6.A", "inherit, render")));
assertFalse(hive.containsPermission(new TestPermission("6.A", "enable")));
assertFalse(hive.containsPermission(new TestPermission("6.B", "inherit, render, enable")));
assertFalse(hive.containsPermission(new TestPermission("6.B", "enable")));
assertFalse(hive.containsPermission(new TestPermission("6.C", "render, enable")));
assertFalse(hive.containsPermission(new TestPermission("6.C.1", "enable")));
assertTrue(hive.containsPrincipal(new SimplePrincipal("test8")));
assertTrue(hive.containsPermission(new TestPermission("8.A")));
assertTrue(hive.containsPermission(new TestPermission("8.B")));
assertFalse(hive.containsPermission(new FaultyPermission()));
assertTrue(hive.containsPrincipal(new SimplePrincipal("test9")));
assertTrue(hive.containsPermission(new TestPermission("9.A")));
assertTrue(hive.containsPermission(new TestPermission("9.B", "test")));
assertTrue(hive.containsPrincipal(new SimplePrincipal("test9B")));
assertTrue(hive.containsPermission(new TestPermission(
"test.ContainerPage2:test.ContainerPage2$SecureMarkupContainer", "inherit, render")));
assertTrue(hive.containsPermission(new TestPermission(
"test2.ContainerPage2:test.ContainerPage2$SecureMarkupContainer", "inherit, render")));
assertTrue(hive.containsPrincipal(new SimplePrincipal("test10")));
assertTrue(hive.containsPermission(new TestPermission("10.B")));
}