public static JsonObject getPayload(String configFile, int testIndex) {
    try {
      JsonObject jsonObject = readJsonFile(configFile);
      List<JsonObject> testObjectList =
        (List<JsonObject>)
          Utils.throwNoKeyOrBadValueException(jsonObject, "tests", JsonArray.class, false);
      return testObjectList.get(testIndex).getJsonObject("payload");
    } catch (Exception e) {
      logger.error(getStackTrace(e));
    }
    return null;
  }
Gets the payload object for the test at index 'testIndex' in the config

@param configFile the kite test config file
@param testIndex  the index of the test to get the payload from

@return the payload object for the test at index 'testIndex' in the config
KITE-Framework/src/main/java/org/webrtc/kite/Utils.java