@Test public void testInvalidInitSeasonalEstimateMultiplicative() { expectedEx.expect(IllegalArgumentException.class); expectedEx.expectMessage("Invalid: Sum of initSeasonalEstimates (4.0001) was outside accepted tolerance. Sum should equal 'frequency' with a tolerance within 1% of largest seasonal estimate distance from 1 (4 ± 0.000011), for MULTIPLICATIVE seasonality type."); subject.validate(INVALID_MULTIPLICATIVE_SEASONAL_COMPONENT, DUMMY_FREQUENCY, HoltWintersSeasonalityType.MULTIPLICATIVE); }
public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); } }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }  }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }  void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType); }
HoltWintersSeasonalEstimatesValidator { public void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType) { checkNotNull(initSeasonalEstimates); if (initSeasonalEstimates.length <= 0) return; checkLength(initSeasonalEstimates, frequency); checkSumOfEstimates(initSeasonalEstimates, frequency, seasonalityType); }  void validate(double[] initSeasonalEstimates, int frequency, HoltWintersSeasonalityType seasonalityType);  }