@@ -0,0 +1,1307 @@
+/**%0A * %0A */%0Apackage com.github.phantomthief.stats.n;%0A%0Aimport static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.Map;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport org.junit.Test;%0A%0Aimport com.github.phantomthief.stats.n.counter.SimpleCounter;%0Aimport com.github.phantomthief.stats.n.impl.SimpleDurationStats;%0A%0A/**%0A * @author w.vela%0A */%0Apublic class SimpleDurationStatsTest %7B%0A%0A    @Test%0A    public void test() throws Exception %7B%0A        SimpleDurationStats%3CSimpleCounter%3E durationStats = SimpleDurationStats.newBuilder().build();%0A        for (int i = 0; i %3C 10; i++) %7B%0A            durationStats.stat(SimpleCounter.stats(10));%0A        %7D%0A        sleepUninterruptibly(10, TimeUnit.SECONDS);%0A        for (int i = 0; i %3C 10; i++) %7B%0A            durationStats.stat(SimpleCounter.stats(10));%0A        %7D%0A        Map%3CLong, SimpleCounter%3E stats = durationStats.getStats();%0A        assertEquals(stats.get(TimeUnit.SECONDS.toMillis(10)).getCost(), 100);%0A        assertEquals(stats.get(TimeUnit.SECONDS.toMillis(10)).getCount(), 10);%0A        assertEquals(stats.get(TimeUnit.MINUTES.toMillis(1)).getCost(), 200);%0A        assertEquals(stats.get(TimeUnit.MINUTES.toMillis(1)).getCount(), 20);%0A        System.out.println(stats);%0A    %7D%0A%7D%0A

add basic testcase for SimpleDurationStats.