### Question:
ConfigUtils { public int getIntValue(Properties props, String key, int defaultValue) { return Integer.parseInt(getStringValue(props, key, Integer.toString(defaultValue))); }  List<String> getNormalizedPackages(String packages); String getStringValue(Properties props, String propertyName, String defaultValue); String getStringValue2(
      Properties props, String propertyName1, String propertyName2, String defaultValue); Optional<String> getStringValue(Properties props, String propertyName); boolean getBooleanValue(Properties props, String key, boolean defaultValue); int getIntValue(Properties props, String key, int defaultValue); String getEnvVarName(String propertyName); String getSystemPropertyName(String key); List<File> getCommaSeparatedFileValues(String uriValues);  }### Answer:
@Test public void should_getOptionalIntValue_when_present_value() { Properties props = new Properties(); props.setProperty("key", "4711"); assertThat(getIntValue(props, "key", 17), is(4711)); }
@Test public void should_getOptionalIntValue_when_missing_value() { assertThat(getIntValue(new Properties(), "key", 17), is(17)); }