NinjaPropertiesImpl implements NinjaProperties { @Override public Boolean getBooleanWithDefault(String key, Boolean defaultValue) { Boolean value = getBoolean(key); if (value != null) { return value; } else { return defaultValue; } } NinjaPropertiesImpl(
            NinjaMode ninjaMode);  NinjaPropertiesImpl(
            NinjaMode ninjaMode, String externalConfigurationPath); @Override String get(String key); @Override String getOrDie(String key); @Override Integer getInteger(String key); @Override Integer getIntegerOrDie(String key); @Override Boolean getBooleanOrDie(String key); @Override Boolean getBoolean(String key); void setProperty(String key, String value); void bindProperties(Binder binder); @Override boolean isProd(); @Override boolean isDev(); @Override boolean isTest(); @Override String getContextPath(); @Override void setContextPath(String contextPath); @Override Properties getAllCurrentNinjaProperties(); @Override String[] getStringArray(String key); @Override String getWithDefault(String key, String defaultValue); @Override Integer getIntegerWithDefault(String key, Integer defaultValue); @Override Boolean getBooleanWithDefault(String key, Boolean defaultValue);  }
@Test public void testGetBooleanWithDefault() { NinjaProperties ninjaProperties = new NinjaPropertiesImpl(NinjaMode.dev); assertEquals(Boolean.valueOf(true), ninjaProperties.getBooleanWithDefault( "non_existsing_property_to_check_defaults", true)); assertEquals(Boolean.valueOf(true), ninjaProperties.getBooleanWithDefault("booleanTestTrue", false)); }