@Test
public void shouldOverrideUrlLoading_withCustomApplicationIntent_withUserClick_butCanNotHandleCustomIntent_shouldDefaultToMoPubBrowser() throws Exception {

    String customUrl = "myintent://something";
    stub(htmlWebView.wasClicked()).toReturn(true);
    subject = new HtmlWebViewClient(htmlWebViewListener, htmlWebView, null, null);
    boolean didOverrideUrl = subject.shouldOverrideUrlLoading(htmlWebView, customUrl);
    assertThat(didOverrideUrl).isTrue();
    verify(htmlWebViewListener).onClicked();
    Intent startedIntent = Robolectric.getShadowApplication().getNextStartedActivity();
    assertThat(startedIntent).isNotNull();
    assertThat(startedIntent.getComponent().getClassName()).isEqualTo("com.mopub.common.MoPubBrowser");
}