code: public static void assertEquals(String message, JSONObject expected, JSONObject actual, JSONCompareMode compareMode)
          throws JSONException {
          JSONCompareResult result = JSONCompare.compareJSON(expected, actual, compareMode);
          if (result.failed()) {
              throw new AssertionError(getCombinedMessage(message, result.getMessage()));
          }
      }
docs: Asserts that the JSONObject provided matches the expected JSONObject.  If it isn't it throws an
  {@link AssertionError}.
  
  @param message Error message to be displayed in case of assertion failure
  @param expected Expected JSONObject
  @param actual JSONObject to compare
  @param compareMode Specifies which comparison mode to use
  @throws JSONException JSON parsing error