@Test
public void testBuildDetector() {

    val factoryUnderTest = new LegacyHoltWintersDetectorFactoryProvider();
    val document = readDocument("holt-winters");
    val detector = factoryUnderTest.buildDetector(document);
    val hw = (HoltWintersPointForecaster) detector.getPointForecaster();
    val hwParams = hw.getParams();
    val welford = (ExponentialWelfordIntervalForecaster) detector.getIntervalForecaster();
    val welfordParams = welford.getParams();
    assertEquals(ForecastingDetector.class, detector.getClass());
    assertEquals("a63c2128-113a-8fd7-942d-f8ae228b61b0", detector.getUuid().toString());
    assertEquals(AnomalyType.RIGHT_TAILED, detector.getAnomalyType());
    assertEquals(2016, hwParams.getFrequency());
    assertEquals(0.15, hwParams.getAlpha(), TOLERANCE);
    assertEquals(0.10, hwParams.getBeta(), TOLERANCE);
    assertEquals(0.20, hwParams.getGamma(), TOLERANCE);
    assertEquals(0, hwParams.getWarmUpPeriod());
    assertEquals(HoltWintersSeasonalityType.MULTIPLICATIVE, hwParams.getSeasonalityType());
    assertEquals(HoltWintersTrainingMethod.NONE, hwParams.getInitTrainingMethod());
    assertEquals(0.0, hwParams.getInitBaseEstimate(), TOLERANCE);
    assertEquals(0.0, hwParams.getInitLevelEstimate(), TOLERANCE);
    assertEquals(0, hwParams.getInitSeasonalEstimates().length);
    assertEquals(3.0, welfordParams.getWeakSigmas(), TOLERANCE);
    assertEquals(4.0, welfordParams.getStrongSigmas(), TOLERANCE);
}