### Question:
Section { public int getIntOrDefault (String key, int defaultValue) { String value = this.get(key); if (value == null) { return defaultValue; } return Integer.parseInt(value); } Section(); String getOrDefault(String key, String defaultStr); String get(String key); int getIntOrDefault(String key, int defaultValue);  }### Answer:
@Test public void testGetInt () { WritableSection section = new WritableSection(); assertEquals(10, section.getIntOrDefault("key", 10)); section.put("key", "20"); assertEquals(20, section.getIntOrDefault("key", 50)); }