### Question:
MainActivityPresenter implements MainActivityContract.Presenter { @Override public void checkIfOauth(URI uri) { if (uri != null) { try { Map<String, List<String>> list = Utilities.splitQuery(uri); String verifier = list.get(PreferenceList.OAUTH_VERIFIER).get(0); String token = list.get(PreferenceList.OAUTH_TOKEN).get(0); preferences.setStringPreference(PreferenceList.OAUTH_VERIFIER, verifier); preferences.setStringPreference(PreferenceList.OAUTH_TOKEN, token); view.startOAuth(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } } MainActivityPresenter(MainActivityContract.View view, SourceContract.Preferences preferences); @Override void showIfLoggedIn(); @Override void checkIfOauth(URI uri); void onButtonClicked(); @Override void toggleDebugMode(); @Override String getUserName(); @Override void savePoiList(); @Override void restorePoiList();  }### Answer:
@Test public void checkIfInOAuthFlow() { URI url = null; try { url = new URI("http: } catch (URISyntaxException e) { e.printStackTrace(); } presenter.checkIfOauth(url); verify(view).startOAuth(); }