Stats implements StatsReader, StatsCollector { @Override public void setAttribute(StatType key, String value) { internalSetAttribute(key.getKey(), new StringProducer(value)); } Stats(String prefix);  Stats(); @Override void exportCounters(Map<String, Long> counterMap); @Override MultiWindowRate getRate(StatType statType); @Override MultiWindowRate getRate(String key); @Override void incrementRate(StatType type, long delta); @Override void incrementRate(String key, long delta); @Override MultiWindowRate getSum(StatType statType); @Override MultiWindowRate getSum(String key); @Override void incrementSum(StatType type, long delta); @Override void incrementSum(String key, long delta); @Override void incrementCounter(StatType key, long delta); @Override void incrementCounter(String key, long delta); @Override @Deprecated long setCounter(StatType statType, long value); @Override @Deprecated long setCounter(String key, long value); @Override long resetCounter(StatType key); @Override long resetCounter(String key); @Override void incrementSpread(StatType type, long value); @Override void incrementSpread(String key, long value); @Override void updateDistribution(StatType type, long value); @Override void updateDistribution(String key, long value); @Override long getCounter(StatType key); @Override long getCounter(String key); @Override MultiWindowSpread getSpread(StatType key); @Override MultiWindowSpread getSpread(String key); @Override MultiWindowDistribution getDistribution(StatType key); @Override MultiWindowDistribution getDistribution(String key); boolean addDynamicCounter(String key, Callable<Long> valueProducer); boolean removeCounter(String key); @Override String getAttribute(StatType key); @Override void setAttribute(StatType key, String value); @Override void setAttribute(String key, String value); @Override void setAttribute(StatType key, Callable<String> valueProducer); @Override void setAttribute(String key, Callable<String> valueProducer); boolean removeAttribute(String key); @Override String getAttribute(String key); @Deprecated @Override Callable<Long> getDynamicCounter(StatType key); @Deprecated @Override Callable<Long> getDynamicCounter(String key); @Override Map<String, String> getAttributes(); Stat concurrentRate(String key); Stat concurrentSpread(String key); Stat concurrentSpreadRate(String key);  }
@Test(groups = "fast") public void testAttributeString() { for (Map.Entry<String, String> attribute : attributeMap.entrySet()) { stats.setAttribute(attribute.getKey(), attribute.getValue()); } verifyStatAttributes(); }
@Test(groups = "fast") public void testAttributeCallable() { for (String key : attributeMap.keySet()) { stats.setAttribute(key, () -> TestStats.this.attributeMap.get(key)); } verifyStatAttributes(); }