@Test
public void shouldOverrideUrlLoading_withMoPubCustom_withUserClick_shouldStartCustomIntent() throws Exception {

    stub(htmlWebView.wasClicked()).toReturn(true);
    boolean didOverrideUrl = subject.shouldOverrideUrlLoading(htmlWebView, "mopub://custom?fnc=myFnc&data=myData");
    assertThat(didOverrideUrl).isTrue();
    verify(htmlWebViewListener).onClicked();
    Intent startedActivity = Robolectric.getShadowApplication().getNextStartedActivity();
    assertThat(startedActivity).isNotNull();
    assertThat(startedActivity.getAction()).isEqualTo("myFnc");
    assertThat(startedActivity.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK).isNotEqualTo(0);
    assertThat(startedActivity.getStringExtra(HtmlBannerWebView.EXTRA_AD_CLICK_DATA)).isEqualTo("myData");
}