NinjaPropertiesImpl implements NinjaProperties { @Override public Integer getIntegerWithDefault(String key, Integer defaultValue) { Integer value = getInteger(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 testGetIntegerWithDefault() { NinjaProperties ninjaProperties = new NinjaPropertiesImpl(NinjaMode.dev); assertEquals(Integer.valueOf(1), ninjaProperties.getIntegerWithDefault( "non_existsing_property_to_check_defaults", 1)); assertEquals(Integer.valueOf(123456789), ninjaProperties.getIntegerWithDefault("integerTest", 1)); }