public SslContext getClientSslContext() {
        try {
            return SslContextBuilder.forClient()
                    .sslProvider(chooseSslProvider())
                    .ciphers(getCiphers(), getCiphersFilter())
                    .protocols(getProtocols())
                    .build();
        } catch (Exception e) {
            log.error("Error loading SslContext client request.", e);
            throw new RuntimeException("Error configuring SslContext for client request!", e);
        }
    }
@Test
    void testGetSslContext() {
        ClientSslContextFactory factory = new ClientSslContextFactory(new DefaultRegistry());
        SslContext sslContext = factory.getClientSslContext();
        assertThat(sslContext).isInstanceOf(OpenSslClientContext.class);
        assertThat(sslContext.isClient()).isTrue();
        assertThat(sslContext.isServer()).isFalse();
        SSLSessionContext sessionContext = sslContext.sessionContext();
        assertThat(sessionContext.getSessionCacheSize()).isEqualTo(20480);
        assertThat(sessionContext.getSessionTimeout()).isEqualTo(300);
    }