long snapshotsRetrieved() {
        return snapshotsRetrieved.get();
    }
@Test
    public void metrics_are_not_refreshed_if_ttl_not_expired() {
        assertEquals(0, nodeMetricsClient.snapshotsRetrieved());
        updateSnapshot(defaultMetricsConsumerId, TTL);
        assertEquals(1, nodeMetricsClient.snapshotsRetrieved());
        updateSnapshot(defaultMetricsConsumerId, TTL);
        assertEquals(1, nodeMetricsClient.snapshotsRetrieved());
        updateSnapshot(defaultMetricsConsumerId, Duration.ZERO);
        assertEquals(2, nodeMetricsClient.snapshotsRetrieved());
    }