RollingAverage { public double average() { if (position == 0) return 0; double sum = 0; final int top = Math.min(position, size); for (int i = 0; i < top; i++) { sum += values[i]; } return sum / top; } RollingAverage(final int size); synchronized double put(final double value); double average(); boolean reachedPeak(); String toS();  }
@Test public void averageTest() { }