@BeforeAll
    public static void beforeAll() throws Exception {
        val bindInit = new BindConnectionInitializer("cn=Directory Manager",
            new Credential("password"));
        @Cleanup
        val connection = new LDAPConnection("localhost", 10389,
            bindInit.getBindDn(), bindInit.getBindCredential().getString());

        val ldif = String.format("dn: cn=%s,%s%n"
            + "objectClass: top%n"
            + "objectClass: person%n"
            + "objectClass: organizationalPerson%n"
            + "objectClass: inetOrgPerson%n"
            + "cn: %s%n"
            + "givenName: %s%n"
            + "title: %s%n"
            + "userPassword: password%n"
            + "sn: %s%n"
            + "uid: %s%n", UID, "ou=people,dc=example,dc=org", UID, UID, UID, UID, UID);

        val rs = new ByteArrayInputStream(ldif.getBytes(StandardCharsets.UTF_8));
        LdapIntegrationTestsOperations.populateEntries(connection,
            rs, "ou=people,dc=example,dc=org", bindInit);
    }
This is {@link BasePrincipalAttributeRepositoryFetcherLdapTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-ldap/src/test/java/org/apereo/cas/authentication/BasePrincipalAttributeRepositoryFetcherLdapTests.java