AverageAccumulator implements SimpleAccumulator<Double> { @Override public Double getLocalValue() { if (this.count == 0) { return 0.0; } return this.localValue / (double)this.count; }  @Override void add(Double value); void add(double value); void add(long value); void add(int value); @Override Double getLocalValue(); @Override void resetLocal(); @Override void merge(Accumulator<Double, Double> other); @Override AverageAccumulator clone(); @Override String toString();  }
@Test public void testGet() { AverageAccumulator average = new AverageAccumulator(); assertEquals(0.0, average.getLocalValue(), 0.0); }