@Test
public void testReloadedOnConfigurationUpdate() {

    SettableConfig config = new DefaultSettableConfig();
    config.setProperty("root.runtimeThresholdInSeconds", "60");
    config.setProperty("root.sigmaThreshold", "10");
    CloseableReference<JobRuntimePredictionSelector> selectorRef = reloadedOnConfigurationUpdate(
            config.getPrefixedView("root"),
            configUpdate -> aboveThreshold(configUpdate, METADATA)
    );
    JobRuntimePredictionSelector selector = selectorRef.get();
    checkSelection(selector.apply(JOB_DESCRIPTOR, JOB_PREDICTIONS), HIGH_QUANTILE);
    // Now change it to fail
    config.setProperty("root.runtimeThresholdInSeconds", "6");
    assertThat(selector.apply(JOB_DESCRIPTOR, JOB_PREDICTIONS)).isEmpty();
    selectorRef.close();
}