@Test
    void verifyFailsOp() throws Throwable {
        val factory = mock(ConnectionFactory.class);
        val wrapper = new LdapConnectionFactory(factory);
        when(factory.getConnectionConfig()).thenThrow(new IllegalArgumentException("fails"));
        when(factory.getConnection()).thenThrow(new IllegalArgumentException("fails"));
        assertFalse(wrapper.executePasswordModifyOperation(null, null, null, AbstractLdapProperties.LdapType.GENERIC));
        assertFalse(wrapper.executeModifyOperation(null, Map.of()));
        assertFalse(wrapper.executeAddOperation(new LdapEntry()));
        assertFalse(wrapper.executeDeleteOperation(new LdapEntry()));
        wrapper.close();
    }
This is {@link LdapUtilsTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-ldap-core/src/test/java/org/apereo/cas/LdapUtilsTests.java