OAuthWebViewClient extends WebViewClient { @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); listener.onPageFinished(view, url); } OAuthWebViewClient(String completeUrl, Listener listener); @Override void onPageFinished(WebView view, String url); @Override boolean shouldOverrideUrlLoading(WebView view, String url); @Override void onReceivedError(WebView view, int errorCode,
            String description, String failingUrl); @Override void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error);  }
@Test public void testOnPageFinished() { final WebView mockWebView = mock(WebView.class); webViewClient.onPageFinished(mockWebView, COMPLETE_URL); verify(mockListener).onPageFinished(eq(mockWebView), eq(COMPLETE_URL)); }