static boolean getConfigValueAsBoolean(ServiceConfiguration conf, String configProp, boolean defaultValue) {
        Object value = conf.getProperty(configProp);
        if (value instanceof Boolean) {
            log.info("Configuration for [{}] is [{}]", configProp, value);
            return (boolean) value;
        } else if (value instanceof String) {
            boolean result = Boolean.parseBoolean((String) value);
            log.info("Configuration for [{}] is [{}]", configProp, result);
            return result;
        } else {
            log.info("Configuration for [{}] is using the default value: [{}]", configProp, defaultValue);
            return defaultValue;
        }
    }
@Test
    public void testGetConfigValueAsBooleanWorks() {
        Properties props = new Properties();
        props.setProperty("prop1", "true");
        ServiceConfiguration config = new ServiceConfiguration();
        config.setProperties(props);
        boolean actual = ConfigUtils.getConfigValueAsBoolean(config, "prop1", false);
        assertTrue(actual);
    }