public static boolean getBoolean(String key, boolean def) {
        String value = get(key);
        if (value == null) {
            return def;
        }

        value = value.trim().toLowerCase();
        if (value.isEmpty()) {
            return def;
        }

        if ("true".equals(value) || "yes".equals(value) || "1".equals(value)) {
            return true;
        }

        if ("false".equals(value) || "no".equals(value) || "0".equals(value)) {
            return false;
        }

        logger.warn(
                "Unable to parse the boolean system property '{}':{} - using the default value: {}",
                key, value, def
        );

        return def;
    }
@Test
    public void testGetBooleanWithTrueValue() {
        System.setProperty("key", "true");
        assertTrue(SystemPropertyUtil.getBoolean("key", false));
        System.setProperty("key", "yes");
        assertTrue(SystemPropertyUtil.getBoolean("key", false));
        System.setProperty("key", "1");
        assertTrue(SystemPropertyUtil.getBoolean("key", true));
    }