### Question:
SlidingStats { public void accumulate(long value) { total.addAndGet(value); events.incrementAndGet(); } SlidingStats(String name, String totalUnitDisplay);  SlidingStats(String name, String totalUnitDisplay, int windowSize, Clock clock); AtomicLong getTotalCounter(); AtomicLong getEventCounter(); Stat<Double> getPerEventLatency(); void accumulate(long value); V time(Timeable<V, E> action); @Override String toString();  }### Answer:
@Test public void testAccumulate() { assertEquals(0L, stat.getEventCounter().get()); assertEquals(0L, stat.getTotalCounter().get()); stat.accumulate(100L); assertEquals(1L, stat.getEventCounter().get()); assertEquals(100L, stat.getTotalCounter().get()); }