SeasonalBuffer { public double updateWhilePadding(MetricData metricData) { notNull(metricData, "metricData can't be null"); checkValidTimestamp(metricData); padMissingDataPoints(metricData); double oldValue = getValueForCurrentIndex(); updateBuffer(metricData); return oldValue; } SeasonalBuffer(int cycleLength, int interval, double missingValuePlaceholder); double updateWhilePadding(MetricData metricData); boolean isReady();  }
@Test(expected = IllegalArgumentException.class) public void testUpdate_nullMetricData() { subject.updateWhilePadding(null); }