@Test
public void shouldTryToBuildLdapConnection() {

    final LdapProperties properties = mock(LdapProperties.class);
    when(properties.getHost()).thenReturn("foo");
    when(properties.getPort()).thenReturn(42);
    assertThrows(LDAPException.class, () -> {
        new SSLLdapConnectionFactory(properties).buildLdapConnection();
    });
}