PreferencesActivity extends WebViewActivity { @Override protected void handleUserReadyEvent(Map<Object, Object> payload) { getWebView().loadUrl(getUrl()); }  @Override void onBackPressed(); static final String EXTRA_USER_TOKEN; }
@Test public void handleUserReadyEvent_ShouldLoadPreferencesUrl() { WebView webView = mock(WebView.class); when(preferencesActivity.getWebView()).thenReturn(webView); preferencesActivity.handleUserReadyEvent(null); verify(webView).loadUrl(UrlHelper.preferencesUrl(context, "my_token")); }