docs: public Set<Map<String, String[]>> searchForMultipleAttributeValues(final String base, final String filter, final Object[] params,
              final String[] attributeNames) {
          // Escape the params acording to RFC2254
          Object[] encodedParams = new String[params.length];
  
          for (int i=0; i < params.length; i++) {
              encodedParams[i] = LdapEncoder.filterEncode(params[i].toString());
          }
  
          String formattedFilter = MessageFormat.format(filter, encodedParams);
          logger.debug("Using filter: " + formattedFilter);
  
          final HashSet<Map<String, String[]>> set = new HashSet<Map<String, String[]>>();
  
          ContextMapper roleMapper = new ContextMapper() {
              public Object mapFromContext(Object ctx) {
                  DirContextAdapter adapter = (DirContextAdapter) ctx;
                  Map<String, String[]> record = new HashMap<String, String[]>();
                  for (String attributeName : attributeNames) {
                      String[] values = adapter.getStringAttributes(attributeName);
                      if (values == null || values.length == 0) {
                          logger.debug("No attribute value found for '" + attributeName + "'");
                      } else {
                          record.put(attributeName, values);
                      }
                  }
                  record.put(DN_KEY, new String[] {adapter.getDn().toString()});
                  set.add(record);
                  return null;
              }
          };
  
          SearchControls ctls = new SearchControls();
          ctls.setSearchScope(searchControls.getSearchScope());
          ctls.setReturningAttributes(attributeNames);
  
          search(base, formattedFilter, ctls, roleMapper);
  
          return set;
      }