### Question:
XACMLExportImport { @VisibleForTesting boolean containsUndesiredCharacters(String s) { final String[] DODGY_LDAP_CHARS = { ",", "+", "\"", "\\", "<", ">", ";" }; Set<String> dodgyChars = new HashSet<String>(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; } @Inject  XACMLExportImport(PrivilegeManagerFactory privilegeManagerFactory,
                             XACMLReaderWriter xacmlReaderWriter,
                             PrivilegeValidator privilegeValidator,
                             SearchFilterFactory searchFilterFactory,
                             @Named(XACMLConstants.DEBUG) Debug debug); List<ImportStep> importXacml(String realm, InputStream xacml, Subject admin, boolean dryRun); PolicySet exportXACML(String realm, Subject admin, List<String> filters); static final String PREFIX; }### Answer:
@Test public void testUndesirablePrivilegeNames() { assertThat(xacmlExportImport.containsUndesiredCharacters("ordinary-name")).isFalse(); assertThat(xacmlExportImport.containsUndesiredCharacters("ordinary+name")).isTrue(); assertThat(xacmlExportImport.containsUndesiredCharacters("+")).isTrue(); assertThat(xacmlExportImport.containsUndesiredCharacters("+name")).isTrue(); assertThat(xacmlExportImport.containsUndesiredCharacters("ordinary-name+")).isTrue(); assertThat(xacmlExportImport.containsUndesiredCharacters("ordinary>name")).isTrue(); assertThat(xacmlExportImport.containsUndesiredCharacters("ordinary<name")).isTrue(); assertThat(xacmlExportImport.containsUndesiredCharacters("ordinary\\name")).isTrue(); }