@Override
    public LDAPConnection getConnection() {
        return FunctionUtils.doUnchecked(() -> {
            val ldap = casProperties.getConsent().getLdap();
            return new LDAPConnection("localhost", LDAP_PORT,
                ldap.getBindDn(),
                ldap.getBindCredential());
        });
    }
Unit tests for {@link LdapConsentRepository} class.

@author Arnold Bergner
@since 5.3.0
support/cas-server-support-consent-ldap/src/test/java/org/apereo/cas/consent/LdapConsentRepositoryTests.java