synchronized Map<K, Integer> values() {
        HashMap<K, Integer> values = new HashMap<>();
        for (Map.Entry<K, StoredIntGauge> entry : gauges.entrySet()) {
            values.put(entry.getKey(), entry.getValue().value());
        }
        return values;
    }
Return a map from keys to current reference counts.
Visible for testing only.
clients/src/main/java/org/apache/kafka/common/metrics/internals/IntGaugeSuite.java