package com.auth0.android;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.squareup.okhttp.HttpUrl;

/**
 * Mock implementation of {@linkplain Auth0} for tests.
 */
public class MockAuth0 extends Auth0 {

    public MockAuth0(@NonNull String clientId, @NonNull String domain) {
        this(clientId, domain, null);
    }

    public MockAuth0(@NonNull String clientId, @NonNull String domain, @Nullable String configurationDomain) {
        super(clientId, domain, configurationDomain);
    }

    /**
     * Returns the result of calling of {@linkplain HttpUrl#parse(String)} on the provided string.
     * Overriden to not enforce HTTPS for tests.
     *
     * @param url The URL to parse
     * @return The parsed URL, or null if the {@code url} parameter was null.
     */
    @Override
    HttpUrl ensureValidUrl(String url) {
        if (url == null) {
            return null;
        }
        return HttpUrl.parse(url);
    }
}

@@ -192,16 +192,152 @@
  tests.%0A
+ * This implementation does not enforce HTTPS, and should be removed after tests are able%0A * to run with the MockWebServer using HTTPS.%0A
  */%0Apubl
@@ -997,24 +997,175 @@
 ring url) %7B%0A
+        // TODO get MockWebServer running with HTTPS and remove this class. Should be done%0A        // after updating to more recent versions of OkHttp%0A
         if (

Update comments to remove MockAuth0 in future