// verify that the db1 rule is empty
ImmutableSet<String> permissions = policy.getPermissions(
Arrays.asList(new Authorizable[] {
new Server("server1"),
new Database("db1")
}), Lists.newArrayList("db1_group")).get("db1_group");
Assert.assertTrue(permissions.toString(), permissions.isEmpty());
permissions = policy.getPermissions(
Arrays.asList(new Authorizable[] {
new Server("server1"),
new Database("db2")
}), Lists.newArrayList("db2_group")).get("db2_group");
Assert.assertEquals(permissions.toString(), 1, permissions.size());
permissions = policy.getPermissions(
Arrays.asList(new Authorizable[] {
new Server("server1"),
new Database("db2")
}), Lists.newArrayList("db2_group")).get("db2_group");
Assert.assertEquals(permissions.toString(), 1, permissions.size());
}