private void setupContext(final HttpClientContext context) {
        if (context.getAuthSchemeRegistry() == null) {
            context.setAuthSchemeRegistry(this.authSchemeRegistry);
        }
        if (context.getCookieSpecRegistry() == null) {
            context.setCookieSpecRegistry(this.cookieSpecRegistry);
        }
        if (context.getCookieStore() == null) {
            context.setCookieStore(this.cookieStore);
        }
        if (context.getCredentialsProvider() == null) {
            context.setCredentialsProvider(this.credentialsProvider);
        }
        if (context.getRequestConfig() == null) {
            context.setRequestConfig(this.defaultConfig);
        }
    }
Internal implementation of {@link CloseableHttpClient}.
<p>
Concurrent message exchanges executed by this client will get assigned to
separate connections leased from the connection pool.
</p>

@since 4.3
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/InternalHttpClient.java