### Question:
SystemPropertyUtil { public static int getInt(String key, int def) { String value = get(key); if (value == null) { return def; } value = value.trim(); try { return Integer.parseInt(value); } catch (Exception e) { } return def; } private  SystemPropertyUtil(); static boolean contains(String key); static String get(String key); static String get(final String key, String def); static int getInt(String key, int def);  }### Answer:
@Test public void getIntDefaultValueWithPropertyNull() { assertEquals(1, SystemPropertyUtil.getInt("key", 1)); }
@Test public void getIntWithPropertValueIsInt() { System.setProperty("key", "123"); assertEquals(123, SystemPropertyUtil.getInt("key", 1)); }
@Test public void getIntDefaultValueWithPropertValueIsNotInt() { System.setProperty("key", "NotInt"); assertEquals(1, SystemPropertyUtil.getInt("key", 1)); }