BaseHtmlWebView extends BaseWebView implements UserClickListener { @Override public void loadUrl(String url) { if (url == null) return; MoPubLog.d("Loading url: " + url); if (url.startsWith("javascript:")) { super.loadUrl(url); } } BaseHtmlWebView(Context context, AdConfiguration adConfiguration); void init(boolean isScrollable); @Override void loadUrl(String url); @Override void onUserClick(); @Override void onResetUserClick(); @Override boolean wasClicked();  }
@Test public void loadUrl_shouldAcceptNullParameter() throws Exception { subject.loadUrl(null); }
@Test public void loadUrl_whenUrlIsJavascript_shouldCallSuperLoadUrl() throws Exception { String javascriptUrl = "javascript:function() {alert(\"guy\")};"; subject.loadUrl(javascriptUrl); assertThat(shadowOf(subject).getLastLoadedUrl()).isEqualTo(javascriptUrl); }