@Override
    String getUsername() throws Exception {
        val bindInit = new BindConnectionInitializer("cn=admin,dc=example,dc=org", new Credential("P@ssw0rd"));
        @Cleanup
        val connection = new LDAPConnection("localhost", 11389,
            bindInit.getBindDn(), bindInit.getBindCredential().getString());

        val uid = UUID.randomUUID().toString();
        val ldif = getLdif(uid);
        val rs = new ByteArrayInputStream(ldif.getBytes(StandardCharsets.UTF_8));
        LdapIntegrationTestsOperations.populateEntries(connection, rs, "ou=people,dc=example,dc=org", bindInit);
        return uid;
    }
Unit test for {@link LdapAuthenticationHandler}.

@author Marvin S. Addison
@author Misagh Moayyed
@since 4.0.0
support/cas-server-support-ldap/src/test/java/org/apereo/cas/authentication/OpenLdapAuthenticationHandlerTests.java