docs: @Override
      public boolean validateObject(Object key, PooledObject<Object> pooledObject) {
          Assert.notNull(this.dirContextValidator,
                  "DirContextValidator may not be null");
          Assert.isTrue(key instanceof DirContextType,
                  "key must be a DirContextType");
          Assert.notNull(pooledObject,
                  "The Object to validate must not be null");
          Assert.isTrue(pooledObject.getObject() instanceof DirContext,
                  "The Object to validate must be of type '" + DirContext.class
                          + "'");
  
          try {
              final DirContextType contextType = (DirContextType) key;
              final DirContext dirContext = (DirContext) pooledObject.getObject();
              return this.dirContextValidator.validateDirContext(contextType,
                      dirContext);
          } catch (Exception e) {
              this.logger.warn("Failed to validate '" + pooledObject.getObject()
                      + "' due to an unexpected exception.", e);
              return false;
          }
      }