class ServerPositioningSource implements PositioningSource {

    @NonNull
    @VisibleForTesting
    MoPubClientPositioning parseJsonResponse(@Nullable String json) throws JSONException {
        if (json == null || json.equals("")) {
            throw new JSONException("Empty response");
        }

        // If the server returns an error explicitly, throw an error with the message.
        JSONObject jsonObject = new JSONObject(json);
        String error = jsonObject.optString("error", null);
        if (error != null) {
            throw new JSONException(error);
        }

        // Parse fixed and repeating rules.
        JSONArray fixed = jsonObject.optJSONArray(FIXED_KEY);
        JSONObject repeating = jsonObject.optJSONObject(REPEATING_KEY);
        MoPubClientPositioning positioning = new MoPubClientPositioning();
        if (fixed == null && repeating == null) {
            throw new JSONException("Must contain fixed or repeating positions");
        }
        if (fixed != null) {
            parseFixedJson(fixed, positioning);
        }
        if (repeating != null) {
            parseRepeatingJson(repeating, positioning);
        }
        return positioning;
    }

      ServerPositioningSource(@NonNull final Context context);
    @VisibleForTesting  ServerPositioningSource(@NonNull final Context context,
            @NonNull final DownloadTaskProvider downloadTaskProvider);

}