public static boolean parseBoolean(String bool, boolean defaultInt) {
        if (bool == null) {
            return defaultInt;
        } else {
            return Boolean.parseBoolean(bool);
        }
    }
@Test
    public void parseBoolean() {
        Assert.assertTrue(CommonUtils.parseBoolean(null, true));
        Assert.assertTrue(CommonUtils.parseBoolean("true", true));
        Assert.assertFalse(CommonUtils.parseBoolean("falSE", true));
        Assert.assertFalse(CommonUtils.parseBoolean("xxx", true));

        Assert.assertFalse(CommonUtils.parseBoolean(null, false));
        Assert.assertTrue(CommonUtils.parseBoolean("trUe", false));
        Assert.assertFalse(CommonUtils.parseBoolean("falSE", false));
        Assert.assertFalse(CommonUtils.parseBoolean("xxx", false));
    }