### Question:
StatsSlidingWindow { public void reset() { long periodId = clock.millis() / periodMillis; synchronized (window) { for (int i = 0; i < window.length; i++) { window[i] = new Bucket(periodId, periodMillis); } currentBucket = window[(int) (idx % size)]; } } StatsSlidingWindow(Duration period, int size);  StatsSlidingWindow(Duration period, int size, Clock clock); Bucket getCurrent(); Bucket getStat(); Bucket getStat(int count); void reset(); long getPeriodMillis(); int getSize(); @Override String toString();  }### Answer:
@Test(groups = "unit") public void reset() throws Exception { StatsSlidingWindow slidingWindow = new StatsSlidingWindow(Duration.ofSeconds(1), 10); slidingWindow.getCurrent().requestEnd(ThriftRequestStatus.SUCCESS, 20); slidingWindow.getCurrent().requestEnd(ThriftRequestStatus.SUCCESS, 40); slidingWindow.reset(); StatsSlidingWindow.Bucket bucket = slidingWindow.getStat(); assertEquals(bucket.getRequestEndCount(0), 0); }