@Test
public void shouldOverrideUrlLoading_withHttpUrl_withUserClick_shouldOpenBrowser() throws Exception {

    stub(htmlWebView.wasClicked()).toReturn(true);
    subject = new HtmlWebViewClient(htmlWebViewListener, htmlWebView, null, null);
    String validUrl = "http://www.mopub.com";
    boolean didOverrideUrl = subject.shouldOverrideUrlLoading(htmlWebView, validUrl);
    assertThat(didOverrideUrl).isTrue();
    verify(htmlWebViewListener).onClicked();
    Intent startedActivity = assertActivityStarted();
    assertThat(startedActivity.getComponent().getClassName()).isEqualTo("com.mopub.common.MoPubBrowser");
    assertThat(startedActivity.getStringExtra(MoPubBrowser.DESTINATION_URL_KEY)).isEqualTo(validUrl);
    assertThat(startedActivity.getData()).isNull();
}