@Test
public void testBuildDetector() {

    val factoryUnderTest = new CusumDetectorFactoryProvider();
    val document = readDocument("cusum");
    val detector = factoryUnderTest.buildDetector(document);
    val params = detector.getParams();
    assertNotNull(detector);
    assertEquals(CusumDetector.class, detector.getClass());
    assertEquals("3ec81aa2-2cdc-415e-b4f3-c1beb223ae60", detector.getUuid().toString());
    assertEquals(120.0, params.getTargetValue(), TOLERANCE);
    assertEquals(0.8, params.getSlackParam(), TOLERANCE);
    assertEquals(110.0, params.getInitMeanEstimate(), TOLERANCE);
    assertEquals(AnomalyType.RIGHT_TAILED, params.getType());
    assertEquals(2.5, params.getWeakSigmas(), TOLERANCE);
    assertEquals(3.5, params.getStrongSigmas(), TOLERANCE);
}