public static boolean parseBooleanValue(String value, String name) {
        if (value.equalsIgnoreCase("ON")
                || value.equalsIgnoreCase("TRUE")
                || value.equalsIgnoreCase("1")) {
            return true;
        }
        if (value.equalsIgnoreCase("OFF")
                || value.equalsIgnoreCase("FALSE")
                || value.equalsIgnoreCase("0")) {
            return false;
        }
        ErrorReport.reportSemanticException(ErrorCode.ERR_INVALID_VALUE, name, value,
                "1, 0, on, off, true, or false (case insensitive)");
        return false;
    }
@Test
    public void testParseBooleanValue() {
        Assert.assertEquals(true, ParseUtil.parseBooleanValue("on", "var"));
        Assert.assertEquals(true, ParseUtil.parseBooleanValue("TRUE", "var"));
        Assert.assertEquals(true, ParseUtil.parseBooleanValue("1", "var"));

        Assert.assertEquals(false, ParseUtil.parseBooleanValue("off", "var"));
        Assert.assertEquals(false, ParseUtil.parseBooleanValue("FALSE", "var"));
        Assert.assertEquals(false, ParseUtil.parseBooleanValue("0", "var"));
    }