Router { public void launchFeedbackActivity(Activity activity) { Uri feedbackURL = Uri.parse(activity.getString(R.string.feedback_url) + BuildConfig.VERSION_NAME); Intent intent = new Intent(Intent.ACTION_VIEW, feedbackURL); activity.startActivity(intent); }  void launchFeedbackActivity(Activity activity); void launchImportActivityForResult(Activity activity, Uri data); void launchCreateDeckFlow(Activity activity, NewDeckContext newDeckContext); void launchFilePicker(Activity activity); static final int REQUEST_CODE_IMPORT_FILE_PICKER; static final int REQUEST_CODE_IMPORT_FILE; static final int REQUEST_CODE_CREATE_DECK; }
@Test public void shouldLaunchFeedbackActivity() { Activity activity = mock(Activity.class); router.launchFeedbackActivity(activity); ArgumentCaptor<Intent> argument = ArgumentCaptor.forClass(Intent.class); verify(activity).startActivity(argument.capture()); assertEquals(Intent.ACTION_VIEW, argument.getValue().getAction()); }