### Question:
RedditAccessTokenRequester { public void request() { final String redirectUrl = mResources.getString(R.string.redirect_url_scheme) + mResources.getString( R.string.redirect_url_callback); final String url = Constants.WEB_URL_REDDIT + "/api/v1/authorize.compact?" + "client_id=" + mResources.getString(R.string.client_id) + "&duration=" + mResources.getString(R.string.reddit_auth_duration) + "&response_type=code" + "&state=" + mStateStorage.getUniqueIdentifier() + "&redirect_uri=" + redirectUrl + "&scope=" + mResources.getString(R.string.reddit_auth_scope); final Intent browserIntent = new Intent(Intent.ACTION_VIEW); browserIntent.setData(Uri.parse(url)); final Intent i = mBrowserIntentBuilder.build(mResources.getString(R.string.chooser_title), browserIntent); if (i == null) { Toast.makeText(mContext, R.string.no_browsers_installed, Toast.LENGTH_LONG).show(); } else { i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(i); } } @Inject  RedditAccessTokenRequester(Context context, Resources resources,
                                       @Named("state") UniqueIdentifierStorage stateStorage,
                                       BrowserIntentBuilder browserIntentBuilder); void request();  }### Answer:
@Test public void request_generatesNewUniqueIdentifierAndStartsActivity() { mTokenRequester.request(); verify(mUniqueIdentifierStorage).getUniqueIdentifier(); verify(mContext).startActivity(any(Intent.class)); }