### Question:
PropertyUtils { public static double getDouble(String key) { String val = getString(key); return getDouble(key,-1.0); } 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 testGetDouble() { double result = PropertyUtils.getDouble("test.server.factor"); assertEquals(result, 3.0, 0); result = PropertyUtils.getDouble(null); assertEquals(result, -1.0, 0); result = PropertyUtils.getDouble("abc"); assertEquals(result, -1.0, 0); result = PropertyUtils.getDouble("abc", 5.0); assertEquals(result, 5.0, 0); result = PropertyUtils.getDouble("test.server.testnumber"); assertEquals(result, -1.0, 0); }