public static Double estimateCvssV2(String severity) {
        switch (severity == null ? "none" : severity.toLowerCase()) {
            case "critical":
            case "high":
                return HIGH;
            case "moderate":
            case "medium":
                return MEDIUM;
            case "info":
            case "none":
            case "informational":
                return NONE;
            case "low":
            case "unknown":
            default:
                return LOW;
        }
    }
@Test
    public void testEstimateCvssV2() {
        String severity = null;
        double expResult = 0.0;
        Double result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "garbage";
        expResult = 3.9;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "Critical";
        expResult = 10.0;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "HIGH";
        expResult = 10.0;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "moderate";
        expResult = 6.9;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "medium";
        expResult = 6.9;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "info";
        expResult = 0.0;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "informational";
        expResult = 0.0;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "low";
        expResult = 3.9;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "unknown";
        expResult = 3.9;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));

        severity = "none";
        expResult = 0.0;
        result = SeverityUtil.estimateCvssV2(severity);
        assertThat(String.format("Expected %s to be %f", severity, expResult),
                result, Matchers.equalTo(expResult));
    }