@Test public void urlHandler_withValidNativeBrowserUrl_shouldCallOnClickSuccess_shouldStartActivity() { final String urlToLoad = "some_url"; final String url = "mopubnativebrowser: new UrlHandler.Builder() .withSupportedUrlActions(IGNORE_ABOUT_SCHEME, HANDLE_MOPUB_SCHEME, FOLLOW_DEEP_LINK, OPEN_IN_APP_BROWSER, HANDLE_PHONE_SCHEME, OPEN_NATIVE_BROWSER, HANDLE_SHARE_TWEET) .withResultActions(mockResultActions) .withMoPubSchemeListener(mockMoPubSchemeListener) .build().handleUrl(context, url); verify(mockResultActions).urlHandlingSucceeded(url, OPEN_NATIVE_BROWSER); verifyNoMoreCallbacks(); final Intent startedActivity = Robolectric.getShadowApplication().peekNextStartedActivity(); assertThat(startedActivity.getAction()).isEqualTo(Intent.ACTION_VIEW); assertThat(startedActivity.getData()).isEqualTo(Uri.parse(urlToLoad)); }
public void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl) { handleUrl(context, destinationUrl, true); }
UrlHandler { public void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl) { handleUrl(context, destinationUrl, true); } }
UrlHandler { public void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl) { handleUrl(context, destinationUrl, true); } private  UrlHandler(
            @NonNull final EnumSet<UrlAction> supportedUrlActions,
            @NonNull final ResultActions resultActions,
            @NonNull final MoPubSchemeListener moPubSchemeListener,
            final boolean skipShowMoPubBrowser); }
UrlHandler { public void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl) { handleUrl(context, destinationUrl, true); } private  UrlHandler(
            @NonNull final EnumSet<UrlAction> supportedUrlActions,
            @NonNull final ResultActions resultActions,
            @NonNull final MoPubSchemeListener moPubSchemeListener,
            final boolean skipShowMoPubBrowser); void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl); void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl,
            final boolean fromUserInteraction); }
UrlHandler { public void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl) { handleUrl(context, destinationUrl, true); } private  UrlHandler(
            @NonNull final EnumSet<UrlAction> supportedUrlActions,
            @NonNull final ResultActions resultActions,
            @NonNull final MoPubSchemeListener moPubSchemeListener,
            final boolean skipShowMoPubBrowser); void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl); void handleUrl(@NonNull final Context context, @NonNull final String destinationUrl,
            final boolean fromUserInteraction);  }