ConnectionParams { @JsonIgnore public Map<String, HeaderProvider> getDynamicHeaders() { return Collections.unmodifiableMap(headerProviders); } private  ConnectionParams(
            SSLContext sslContext,
            Path privateKey, Path certificate, Path caCertificates,
            HostnameVerifier hostnameVerifier,
            Multimap<String, String> headers,
            Map<String, HeaderProvider> headerProviders,
            int numPersistentConnectionsPerEndpoint,
            String proxyHost,
            int proxyPort,
            boolean useCompression,
            int maxRetries,
            long minTimeBetweenRetriesMs,
            boolean dryRun,
            boolean runThreads,
            int traceLevel,
            int traceEveryXOperation,
            boolean printTraceToStdErr,
            boolean useTlsConfigFromEnvironment,
            Duration connectionTimeToLive); @JsonIgnore SSLContext getSslContext(); @JsonIgnore HostnameVerifier getHostnameVerifier(); Collection<Map.Entry<String, String>> getHeaders(); @JsonIgnore Map<String, HeaderProvider> getDynamicHeaders(); int getNumPersistentConnectionsPerEndpoint(); String getProxyHost(); int getProxyPort(); boolean getUseCompression(); int getMaxRetries(); long getMinTimeBetweenRetriesMs(); boolean isDryRun(); boolean runThreads(); int getTraceLevel(); int getTraceEveryXOperation(); boolean getPrintTraceToStdErr(); boolean useTlsConfigFromEnvironment(); Duration getConnectionTimeToLive(); Path getPrivateKey(); Path getCertificate(); Path getCaCertificates();  }
@Test public void header_providers_are_registered() { ConnectionParams.HeaderProvider dummyProvider1 = () -> "fooValue"; ConnectionParams.HeaderProvider dummyProvider2 = () -> "barValue"; ConnectionParams params = new ConnectionParams.Builder() .addDynamicHeader("foo", dummyProvider1) .addDynamicHeader("bar", dummyProvider2) .build(); Map<String, ConnectionParams.HeaderProvider> headerProviders = params.getDynamicHeaders(); assertEquals(2, headerProviders.size()); assertEquals(dummyProvider1, headerProviders.get("foo")); assertEquals(dummyProvider2, headerProviders.get("bar")); }