### Question:
PropertyUtils { public static int getInt(String key) { return getInt(key, -1); } private  PropertyUtils(); static String getString(String key); static String getString(String key, String defaultVal); static int getInt(String key); static int getInt(String key, int defaultValue); static Boolean getBoolean(String key); static long getLong(String key); static long getLong(String key, long defaultVal); static double getDouble(String key); static double getDouble(String key, double defaultVal); static String[] getArray(String key, String splitStr); static T getEnum(String key, Class<T> type,
                                         T defaultValue);  }### Answer:
@Test public void testGetInt() { int result = PropertyUtils.getInt("mail.server.port"); assertSame(result, 25); result = PropertyUtils.getInt(null); assertSame(result, -1); result = PropertyUtils.getInt("abc"); assertSame(result, -1); result = PropertyUtils.getInt("abc", 300); assertEquals(result, 300); result = PropertyUtils.getInt("test.server.testnumber"); assertSame(result, -1); }