code: public static SearchRequest newSearchRequest(final String baseDn, final SearchFilter filter) {
          final SearchRequest sr = new SearchRequest(baseDn, filter);
          sr.setBinaryAttributes(ReturnAttributes.ALL_USER.value());
          sr.setReturnAttributes(ReturnAttributes.ALL_USER.value());
          sr.setSearchScope(SearchScope.SUBTREE);
          return sr;
      }
docs: Builds a new request.
  
  @param baseDn the base dn
  @param filter the filter
  @return the search request