synchronized public void clear() {
    count = 0;
    bufferCount = 0;
    samples.clear();
  }
@Test
  public void testClear() throws IOException {
    for (int i = 0; i < 1000; i++) {
      estimator.insert(i);
    }
    estimator.clear();
    assertThat(estimator.getCount()).isZero();
    assertThat(estimator.getSampleCount()).isZero();
    assertThat(estimator.snapshot()).isNull();
  }