@Test
public void onPageStarted_whenLoadedUrlStartsWithRedirectAndHasClickthrough_withUserClick_shouldNotChangeUrl_shouldOpenInBrowser() throws Exception {

    stub(htmlWebView.wasClicked()).toReturn(true);
    String url = "redirectUrlToLoad";
    WebView view = mock(WebView.class);
    subject.onPageStarted(view, url, null);
    verify(view).stopLoading();
    Intent intent = Robolectric.getShadowApplication().getNextStartedActivity();
    assertThat(intent.getStringExtra(MoPubBrowser.DESTINATION_URL_KEY)).isEqualTo(url);
    assertThat(intent.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK).isNotEqualTo(0);
    assertThat(intent.getComponent().getClassName()).isEqualTo("com.mopub.common.MoPubBrowser");
}