@Test
public void testResetBuckets() {

    MockedTime time = new MockedTime();
    try {
        HystrixRollingNumber counter = new HystrixRollingNumber(time, 200, 10);
        // we start out with 0 buckets in the queue
        assertEquals(0, counter.buckets.size());
        // add 1
        counter.increment(HystrixRollingNumberEvent.SUCCESS);
        // confirm we have 1 bucket
        assertEquals(1, counter.buckets.size());
        // confirm we still have 1 bucket
        assertEquals(1, counter.buckets.size());
        // add 1
        counter.increment(HystrixRollingNumberEvent.SUCCESS);
        // we should now have a single bucket with no values in it instead of 2 or more buckets
        assertEquals(1, counter.buckets.size());
    } catch (Exception e) {
        e.printStackTrace();
        fail("Exception: " + e.getMessage());
    }
}