@Test
public void testBuildDetector() {

    val factoryUnderTest = new ConstantThresholdDetectorFactoryProvider();
    val document = readDocument("constant-threshold");
    val detector = factoryUnderTest.buildDetector(document);
    val params = detector.getParams();
    val thresholds = params.getThresholds();
    assertNotNull(detector);
    assertSame(ConstantThresholdDetector.class, detector.getClass());
    assertEquals("e2e290a0-d1c1-471e-9d72-79d43282cfbd", detector.getUuid().toString());
    assertEquals(AnomalyType.RIGHT_TAILED, params.getType());
    assertEquals(16666.0, thresholds.getUpperStrong(), TOLERANCE);
    assertEquals(2161.0, thresholds.getUpperWeak(), TOLERANCE);
}