BaseHtmlWebView extends BaseWebView implements UserClickListener { void loadHtmlResponse(String htmlResponse) { loadDataWithBaseURL("http: null); } 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 loadHtmlResponse_shouldCallLoadDataWithBaseURL() throws Exception { String htmlResponse = "some random html response"; subject.loadHtmlResponse(htmlResponse); ShadowWebView.LoadDataWithBaseURL lastLoadData = shadowOf(subject).getLastLoadDataWithBaseURL(); assertThat(lastLoadData.baseUrl).isEqualTo("http: assertThat(lastLoadData.data).isEqualTo(htmlResponse); assertThat(lastLoadData.mimeType).isEqualTo("text/html"); assertThat(lastLoadData.encoding).isEqualTo("utf-8"); assertThat(lastLoadData.historyUrl).isNull(); }