TimeSeriesData { public void clear() { if (!data.isEmpty()) { offers.add(CLEANUP_MARKER); process(clock.wallTime()); } } TimeSeriesData(long retentionMs,
                          long stepMs,
                          BiFunction<Double, Long, Double> adjuster,
                          Clock clock); void add(double value, long timestamp); void clear(); double getAggregatedValue();  }
@Test public void testClear() { timeSeriesData.add(10, testClock.wallTime()); timeSeriesData.clear(); assertThat(timeSeriesData.getAggregatedValue()).isEqualTo(0); }