DistributionCell implements Distribution, MetricCell<DistributionData> { @Override public void reset() { dirty.afterModification(); value.set(DistributionData.EMPTY); } DistributionCell(MetricName name); @Override void reset(); @Override void update(long n); @Override void update(long sum, long count, long min, long max); @Override DirtyState getDirty(); @Override DistributionData getCumulative(); @Override MetricName getName(); @Override boolean equals(@Nullable Object object); @Override int hashCode();  }
@Test public void testReset() { DistributionCell distributionCell = new DistributionCell(MetricName.named("namespace", "name")); distributionCell.update(2); assertThat(distributionCell.getCumulative(), equalTo(DistributionData.create(2, 1, 2, 2))); distributionCell.reset(); assertThat(distributionCell.getCumulative(), equalTo(DistributionData.EMPTY)); assertThat(distributionCell.getDirty(), equalTo(new DirtyState())); }