### Question:
GlobalPermissionEvaluator { public boolean hasGlobalPrincipal(Set<String> agentPrincipals) { return globalPrincipals.stream().anyMatch(agentPrincipals::contains); } GlobalPermissionEvaluator(Properties properties); boolean hasGlobalPermission(Set<String> agentPrincipals, Permission permission); boolean hasGlobalPrincipal(Set<String> agentPrincipals); Set<UserRole> getGlobalUserRoles(Set<String> agentPrincipals);  }### Answer:
@Test public void hasGlobalPrincipalTest() { addGlobalAssignment(UserRole.canManage, PRINC_GRP1); evaluator = new GlobalPermissionEvaluator(configProperties); assertTrue(evaluator.hasGlobalPrincipal(principals)); }
@Test public void noGlobalPrincipalTest() { addGlobalAssignment(UserRole.canManage, PRINC_GRP2); evaluator = new GlobalPermissionEvaluator(configProperties); assertFalse(evaluator.hasGlobalPrincipal(principals)); }