docs: static CloseableHttpClient buildHttpClient(
        boolean insecureMode, File ocspCacheFile, boolean useOcspCacheServer)
    {
      // set timeout so that we don't wait forever.
      // Setup the default configuration for all requests on this client
      DefaultRequestConfig =
          RequestConfig.custom()
              .setConnectTimeout(DEFAULT_CONNECTION_TIMEOUT)
              .setConnectionRequestTimeout(DEFAULT_CONNECTION_TIMEOUT)
              .setSocketTimeout(DEFAULT_HTTP_CLIENT_SOCKET_TIMEOUT)
              .build();
  
      TrustManager[] trustManagers = null;
      if (!insecureMode)
      {
        // A custom TrustManager is required only if insecureMode is disabled,
        // which is by default in the production. insecureMode can be enabled
        // 1) OCSP service is down for reasons, 2) PowerMock test tht doesn't
        // care OCSP checks.
        TrustManager[] tm = {
            new SFTrustManager(ocspCacheFile, useOcspCacheServer)};
        trustManagers = tm;
      }
      try
      {
        Registry<ConnectionSocketFactory> registry =
            RegistryBuilder.<ConnectionSocketFactory>create()
                .register("https",
                          new SFSSLConnectionSocketFactory(trustManagers, socksProxyDisabled))
                .register("http",
                          new SFConnectionSocketFactory())
                .build();
  
        // Build a connection manager with enough connections
        connectionManager = new PoolingHttpClientConnectionManager(registry);
        connectionManager.setMaxTotal(DEFAULT_MAX_CONNECTIONS);
        connectionManager.setDefaultMaxPerRoute(DEFAULT_MAX_CONNECTIONS_PER_ROUTE);
  
        if (useProxy)
        {
          // use the custom proxy properties
          HttpHost proxy = new HttpHost(proxyHost, proxyPort);
          Credentials credentials =
              new UsernamePasswordCredentials(proxyUser, proxyPassword);
          AuthScope authScope = new AuthScope(proxyHost, proxyPort);
          CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
          credentialsProvider.setCredentials(authScope, credentials);
          SdkProxyRoutePlanner sdkProxyRoutePlanner = new SdkProxyRoutePlanner(
              proxyHost, proxyPort, nonProxyHosts
          );
          httpClient =
              HttpClientBuilder.create()
                  .setDefaultRequestConfig(DefaultRequestConfig)
                  .setConnectionManager(connectionManager)
                  // Support JVM proxy settings
                  .useSystemProperties()
                  .setRedirectStrategy(new DefaultRedirectStrategy())
                  .setUserAgent("-")     // needed for Okta
                  .disableCookieManagement() // SNOW-39748
                  .setProxy(proxy)
                  .setDefaultCredentialsProvider(credentialsProvider)
                  .setRoutePlanner(sdkProxyRoutePlanner)
                  .build();
        }
        else
        {
          httpClient =
              HttpClientBuilder.create()
                  .setDefaultRequestConfig(DefaultRequestConfig)
                  .setConnectionManager(connectionManager)
                  // Support JVM proxy settings
                  .useSystemProperties()
                  .setRedirectStrategy(new DefaultRedirectStrategy())
                  .setUserAgent("-")     // needed for Okta
                  .disableCookieManagement() // SNOW-39748
                  .build();
        }
        return httpClient;
      }
      catch (NoSuchAlgorithmException | KeyManagementException ex)
      {
        throw new SSLInitializationException(ex.getMessage(), ex);
      }
    }