public static Builder builder(MetricRegistry metricsRegistry) {
        return new Builder().metricsRegistry(metricsRegistry);
    }
@Test
    public void shouldRemoveGauges() {
        final InstrumentedHttpClientConnectionManager instrumentedHttpClientConnectionManager = InstrumentedHttpClientConnectionManager.builder(metricRegistry).build();
        assertThat(metricRegistry.getGauges().entrySet().stream()
                .map(e -> entry(e.getKey(), e.getValue().getValue())))
                .containsOnly(entry("org.apache.http.conn.HttpClientConnectionManager.available-connections", 0),
                        entry("org.apache.http.conn.HttpClientConnectionManager.leased-connections", 0),
                        entry("org.apache.http.conn.HttpClientConnectionManager.max-connections", 20),
                        entry("org.apache.http.conn.HttpClientConnectionManager.pending-connections", 0));

        instrumentedHttpClientConnectionManager.close();
        Assert.assertEquals(0, metricRegistry.getGauges().size());

        // should be able to create another one with the same name ("")
        InstrumentedHttpClientConnectionManager.builder(metricRegistry).build().close();
    }