IntentUtils { public static void startSiteIntent(Context context, String website) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(website)); context.startActivity(intent); } private  IntentUtils(); static void startEmailIntent(Context context, String chooserTitle, String recipient, String subject); static void startSiteIntent(Context context, String website); static void startGooglePlayIntent(Context context); static void restartApp(Context context);  }
@Test public void should_start_site_intent() { String site = "http: IntentUtils.startSiteIntent(activity, site); ShadowActivity shadowActivity = Shadows.shadowOf(activity); Intent intent = shadowActivity.getNextStartedActivity(); assertThat(intent.getAction()).isEqualTo(Intent.ACTION_VIEW); assertThat(intent.getDataString()).isEqualTo(site); }