Changed tests to use JSONObject