code: public static void assertEquals(String message, String expectedStr, JSONObject actual, JSONCompareMode compareMode)
          throws JSONException {
          Object expected = JSONParser.parseJSON(expectedStr);
          if (expected instanceof JSONObject) {
              assertEquals(message, (JSONObject)expected, actual, compareMode);
          }
          else {
              throw new AssertionError("Expecting a JSON array, but passing in a JSON object");
          }
      }
docs: Asserts that the JSONObject provided matches the expected string.  If it isn't it throws an
  {@link AssertionError}.
  
  @param message Error message to be displayed in case of assertion failure
  @param expectedStr Expected JSON string
  @param actual JSONObject to compare
  @param compareMode Specifies which comparison mode to use
  @throws JSONException JSON parsing error