### Question:
AvgMinMaxPercentileCounter extends Metric implements Summary { public Map<String, Object> values() { Map<String, Object> m = new LinkedHashMap<>(); m.putAll(counter.values()); m.put("p50_" + name, Math.round(this.histogram.getSnapshot().getMedian())); m.put("p95_" + name, Math.round(this.histogram.getSnapshot().get95thPercentile())); m.put("p99_" + name, Math.round(this.histogram.getSnapshot().get99thPercentile())); m.put("p999_" + name, Math.round(this.histogram.getSnapshot().get999thPercentile())); return m; } AvgMinMaxPercentileCounter(String name); void addDataPoint(long value); void resetMax(); void reset(); void add(long value); Map<String, Object> values();  }### Answer:
@Test public void testValues() { addDataPoints(); Map<String, Object> values = testCounter.values(); assertEquals(9, values.size(), "There should be 9 values in the set"); assertEquals(999D / 2, values.get("avg_test"), "should avg=499.5"); assertEquals(0L, values.get("min_test"), "should have min=0"); assertEquals(999L, values.get("max_test"), "should have max=999"); assertEquals(1000L, values.get("cnt_test"), "should have cnt=1000"); assertEquals(999 * 500L, values.get("sum_test"), "should have sum=999*500"); assertEquals(500L, values.get("p50_test"), "should have p50=500"); assertEquals(950L, values.get("p95_test"), "should have p95=950"); assertEquals(990L, values.get("p99_test"), "should have p99=990"); assertEquals(999L, values.get("p999_test"), "should have p999=999"); }