@Disabled("connecting to the outside world makes this test flaky")
@Test
public void testCommonClientUsesExtensibleTrustManagerFailure() throws Throwable {

    doThrow(new CertificateException()).when(extensibleTrustManager).checkServerTrusted(
            ArgumentMatchers.any(X509Certificate[].class), anyString(), ArgumentMatchers.any(SSLEngine.class));
    HttpClient httpClient = webClientFactory.getCommonHttpClient();
    assertThrows(SSLHandshakeException.class, () -> {
        try {
            httpClient.GET(TEST_URL);
        } catch (ExecutionException e) {
            throw e.getCause();
        }
    });
}