protected InstrumentedHttpClientConnectionManager createConnectionManager(Registry<ConnectionSocketFactory> registry,
                                                                              String name) {
        final Duration ttl = configuration.getTimeToLive();
        final InstrumentedHttpClientConnectionManager manager = InstrumentedHttpClientConnectionManager.builder(metricRegistry)
            .socketFactoryRegistry(registry)
            .dnsResolver(resolver)
            .timeToLive(TimeValue.of(ttl.getQuantity(), ttl.getUnit()))
            .name(name)
            .build();
        return configureConnectionManager(manager);
    }
@Test
    void usesASystemDnsResolverByDefault() {
        final InstrumentedHttpClientConnectionManager manager = builder.createConnectionManager(registry, "test");

        assertThat(manager)
                .extracting("connectionOperator")
                .extracting("dnsResolver")
                .isInstanceOf(SystemDefaultDnsResolver.class);
    }