@Test
public void getSensitivityValueContingency() {

    List<SensitivityValue> values = new ArrayList<>();
    values.add(new SensitivityValue(factorOk, Double.NaN, Double.NaN, Double.NaN));
    values.add(new SensitivityValue(factorNok, Double.NaN, Double.NaN, Double.NaN));
    Map<String, List<SensitivityValue>> valuesContingency = Collections.singletonMap("Contingency", values);
    SensitivityAnalysisResult results = new SensitivityAnalysisResult(true, Collections.emptyMap(), "", values, valuesContingency);
    assertSame(factorOk, results.getSensitivityValue(factorOk.getFunction(), factorOk.getVariable(), "Contingency").getFactor());
    assertSame(factorNok, results.getSensitivityValue(factorNok.getFunction(), factorNok.getVariable(), "Contingency").getFactor());
    assertSame(factorOk, results.getSensitivityValue(factorOk, "Contingency").getFactor());
    assertSame(factorNok, results.getSensitivityValue(factorNok, "Contingency").getFactor());
}