### Question:
XACMLPrivilegeUtils { @VisibleForTesting public static boolean containsUndesiredCharacters(String s) { final String[] DODGY_LDAP_CHARS = { ",", "+", "\"", "\\", "<", ">", ";" }; Set<String> dodgyChars = new HashSet<>(Arrays.asList(DODGY_LDAP_CHARS)); for(int i = 0; i < s.length(); i++) { String sub = s.substring(i, i + 1); if (dodgyChars.contains(sub)) { return true; } } return false; } private  XACMLPrivilegeUtils(); static String toXACML(Privilege privilege); static String toXML(Policy policy); static String toXML(PolicySet policySet); static void writeXMLToStream(PolicySet policySet, OutputStream outputStream); static Policy privilegeToPolicy(Privilege privilege); static String privilegeNameToPolicyId(String privilegeName,
            String applicationName); static List<AnyOf> entitlementSubjectToAnyOfList(
            EntitlementSubject es); static AnyOf entitlementSubjectToAnyOf(
            EntitlementSubject es); static List<AnyOf> resourceNamesToAnyOfList(
            Set<String> resourceNames, String applicationName); static AnyOf applicationNameToAnyOf(String applicationName); static List<AnyOf> actionNamesToAnyOfList(
            Set<String> actionNames, String applicationName); static Match resourceNameToMatch(String resourceName,
            String applicationName); static Match resourceNameToNotMatch(String resourceName,
            String applicationName); static Match actionNameToMatch(String actionName,
            String applicationName); static Match applicationNameToMatch(String applicationName); static Condition eSubjectConditionToXCondition(
            EntitlementSubject es, EntitlementCondition ec); static String getRuleCombiningAlgId(String applicationName); static Set<Privilege> policySetToPrivileges(PolicySet policySet); static Privilege policyToPrivilege(Policy policy); static String getApplicationNameFromPolicy(Policy policy); static Set<String> getResourceNamesFromPolicy(Policy policy); static String policyIdToPrivilegeName(String policyId); static String getVariableById(Policy policy, String id); static PolicySet privilegesToPolicySet(String realm, Collection<Privilege> privileges); static PolicySet newPolicySet(String realm); static PolicySet addPolicyToPolicySet(Policy policy,
            PolicySet policySet); static Map<String, Boolean> getActionValuesFromPolicy(Policy policy); static EntitlementSubject getEntitlementSubjectFromPolicy(Policy policy); static EntitlementCondition getEntitlementConditionFromPolicy(Policy policy); static PolicySet streamToPolicySet(InputStream stream); static Set<Policy> getPoliciesFromPolicySet(PolicySet policySet); static Policy referralToPolicy(ReferralPrivilege privilege); static Policy referralToPolicyInternal(ReferralPrivilege privilege); static boolean isReferralPolicy(Policy policy); static ReferralPrivilege policyToReferral(Policy policy); static AnyOf realmsAppsResourcesToAnyOf(Set<String> realms,
            Map<String, Set<String>> appsResources); static void validate(Privilege privilege, PrivilegeValidator privilegeValidator); @VisibleForTesting static boolean containsUndesiredCharacters(String s);  }### Answer:
@Test public void testUndesirablePrivilegeNames() { assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("ordinary-name")).isFalse(); assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("ordinary+name")).isTrue(); assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("+")).isTrue(); assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("+name")).isTrue(); assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("ordinary-name+")).isTrue(); assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("ordinary>name")).isTrue(); assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("ordinary<name")).isTrue(); assertThat(XACMLPrivilegeUtils.containsUndesiredCharacters("ordinary\\name")).isTrue(); }