public static int getIntFromJsonObject(JsonObject jsonObject, String key, int minimumPositiveValue)
    throws KiteInsufficientValueException {
    if (System.getProperty(key) == null) {
      try {
        int value = jsonObject.getInt(key);
        if (value < minimumPositiveValue) {
          return minimumPositiveValue;
        } else {
          return value;
        }
      } catch (NullPointerException e) {
        if (minimumPositiveValue >= 0) {
          return minimumPositiveValue;
        } else {
          throw new KiteInsufficientValueException("Invalid minimum positive value for " + key);
        }
      }
    } else {
      return Integer.parseInt(System.getProperty(key));
    }
  }
Gets the integer value from a given json object,
overwrite it with System env or a minimum positive value if applicable

@param jsonObject           the json object
@param key                  name of the attribute
@param minimumPositiveValue minimum positive value

@return an integer value
@throws KiteInsufficientValueException if the value does not exist and no minimum positive value is provided
KITE-Framework/src/main/java/org/webrtc/kite/Utils.java