docs: public static EntryResolver newLdaptiveSearchEntryResolver(final AbstractLdapAuthenticationProperties l,
                                                                 final PooledConnectionFactory factory) {
          if (StringUtils.isBlank(l.getBaseDn())) {
              throw new IllegalArgumentException("To create a search entry resolver, base dn cannot be empty/blank ");
          }
          if (StringUtils.isBlank(l.getSearchFilter())) {
              throw new IllegalArgumentException("To create a search entry resolver, user filter cannot be empty/blank");
          }
  
          val entryResolver = new BinaryAttributeAwarePooledSearchEntryResolver();
          entryResolver.setBaseDn(l.getBaseDn());
          entryResolver.setUserFilter(l.getSearchFilter());
          entryResolver.setSubtreeSearch(l.isSubtreeSearch());
          entryResolver.setConnectionFactory(factory);
          entryResolver.setAllowMultipleEntries(l.isAllowMultipleEntries());
          entryResolver.setBinaryAttributes(l.getBinaryAttributes());
  
          if (StringUtils.isNotBlank(l.getDerefAliases())) {
              entryResolver.setDerefAliases(DerefAliases.valueOf(l.getDerefAliases()));
          }
          val handlers = new ArrayList<SearchEntryHandler>();
          l.getSearchEntryHandlers().forEach(h -> {
              switch (h.getType()) {
                  case CASE_CHANGE:
                      val eh = new CaseChangeEntryHandler();
                      val caseChange = h.getCaseChange();
                      eh.setAttributeNameCaseChange(CaseChangeEntryHandler.CaseChange.valueOf(caseChange.getAttributeNameCaseChange()));
                      eh.setAttributeNames(caseChange.getAttributeNames().toArray(ArrayUtils.EMPTY_STRING_ARRAY));
                      eh.setAttributeValueCaseChange(CaseChangeEntryHandler.CaseChange.valueOf(caseChange.getAttributeValueCaseChange()));
                      eh.setDnCaseChange(CaseChangeEntryHandler.CaseChange.valueOf(caseChange.getDnCaseChange()));
                      handlers.add(eh);
                      break;
                  case DN_ATTRIBUTE_ENTRY:
                      val ehd = new DnAttributeEntryHandler();
                      val dnAttribute = h.getDnAttribute();
                      ehd.setAddIfExists(dnAttribute.isAddIfExists());
                      ehd.setDnAttributeName(dnAttribute.getDnAttributeName());
                      handlers.add(ehd);
                      break;
                  case MERGE:
                      val ehm = new MergeAttributeEntryHandler();
                      val mergeAttribute = h.getMergeAttribute();
                      ehm.setAttributeNames(mergeAttribute.getAttributeNames().toArray(ArrayUtils.EMPTY_STRING_ARRAY));
                      ehm.setMergeAttributeName(mergeAttribute.getMergeAttributeName());
                      handlers.add(ehm);
                      break;
                  case OBJECT_GUID:
                      handlers.add(new ObjectGuidHandler());
                      break;
                  case OBJECT_SID:
                      handlers.add(new ObjectSidHandler());
                      break;
                  case PRIMARY_GROUP:
                      val ehp = new PrimaryGroupIdHandler();
                      val primaryGroupId = h.getPrimaryGroupId();
                      ehp.setBaseDn(primaryGroupId.getBaseDn());
                      ehp.setGroupFilter(primaryGroupId.getGroupFilter());
                      handlers.add(ehp);
                      break;
                  case RANGE_ENTRY:
                      handlers.add(new RangeEntryHandler());
                      break;
                  case RECURSIVE_ENTRY:
                      val recursive = h.getRecursive();
                      handlers.add(new RecursiveEntryHandler(recursive.getSearchAttribute(), recursive.getMergeAttributes().toArray(ArrayUtils.EMPTY_STRING_ARRAY)));
                      break;
                  default:
                      break;
              }
          });
  
          if (!handlers.isEmpty()) {
              LOGGER.debug("Search entry handlers defined for the entry resolver of [{}] are [{}]", l.getLdapUrl(), handlers);
              entryResolver.setSearchEntryHandlers(handlers.toArray(SearchEntryHandler[]::new));
          }
          if (l.isFollowReferrals()) {
              entryResolver.setReferralHandler(new SearchReferralHandler());
          }
          return entryResolver;
      }