### Question:
JsonUtil { public static Boolean getBoolean(JSONObject jsonObject, String key) { if(jsonObject.containsKey(key)) { return (Boolean) jsonObject.get(key); } else { return false; } }  static String getString(JSONObject jsonObject, String key); static Boolean getBoolean(JSONObject jsonObject, String key); static long getLong(JSONObject jsonObject, String key); static int getInteger(JSONObject jsonObject, String key); static JSONArray getJsonArray(JSONObject jsonObject, String key); static JSONObject getJsonObject(JSONObject jsonObject, String key);  }### Answer:
@Test public void testGetBoolean() { assertTrue(JsonUtil.getBoolean(jsonObj, "boolkey")); assertTrue(!JsonUtil.getBoolean(jsonObj, "boolkey1")); }