ConfigManager { public static String get(String key, String defaultValue) { String v = get(key); if(v == null) { v = defaultValue; } return v; }  static JSONObject getCatalogJSON(); static String get(String key, String defaultValue); static String get(String key); static double getDouble(String key, double defaultValue); static double getDouble(String key); static int getInt(String key, int defaultValue); static int getInt(String key); static long getLong(String key, long defaultValue); static long getLong(String key); static boolean getBoolean(String key, boolean defaultValue); static Boolean getBoolean(String key); static String getInternalAuthToken(); static JSONObject parseCFEnv(String serviceName);  }
@Test public void getTest() throws InterruptedException { assertEquals("NA", ConfigManager.get("noExisting", "NA")); assertEquals("catalog.json", ConfigManager.get("catalogFile")); assertEquals(1, ConfigManager.getInt("noExisting", 1)); assertEquals(10000, ConfigManager.getInt("couchdbTimeout")); assertEquals(1L, ConfigManager.getLong("noExisting", 1)); assertEquals(10000L, ConfigManager.getLong("couchdbTimeout")); assertEquals(false, ConfigManager.getBoolean("noExisting", false)); }