Intents { public static void launchIntentForUserClick(@NonNull final Context context, @NonNull final Intent intent, @Nullable final String errorMessage) throws IntentNotResolvableException { Preconditions.NoThrow.checkNotNull(context); Preconditions.NoThrow.checkNotNull(intent); try { Intents.startActivity(context, intent); } catch (IntentNotResolvableException e) { throw new IntentNotResolvableException(errorMessage + "\n" + e.getMessage()); } } private  Intents(); static void startActivity(@NonNull final Context context, @NonNull final Intent intent); static Intent getStartActivityIntent(@NonNull final Context context,
            @NonNull final Class clazz, @Nullable final Bundle extras); static boolean deviceCanHandleIntent(@NonNull final Context context,
            @NonNull final Intent intent); static boolean canHandleApplicationUrl(final Context context, final Uri uri); static boolean canHandleApplicationUrl(final Context context, final Uri uri,
            final boolean logError); static Intent intentForNativeBrowserScheme(@NonNull final Uri uri); static Intent intentForShareTweet(@NonNull final Uri uri); static void showMoPubBrowserForUrl(@NonNull final Context context,
            @NonNull Uri uri); static void launchActionViewIntent(Context context, @NonNull final Uri uri,
            @NonNull final String errorMessage); static void launchIntentForUserClick(@NonNull final Context context,
            @NonNull final Intent intent, @Nullable final String errorMessage); static void launchApplicationUrl(@NonNull final Context context,
            @NonNull final Uri uri);  }
@Test public void launchIntentForUserClick_shouldStartActivity() throws Exception { Context context = Robolectric.buildActivity(Activity.class).create().get() .getApplicationContext(); Intent intent = mock(Intent.class); Intents.launchIntentForUserClick(context, intent, null); final Intent startedActivity = Robolectric.getShadowApplication().peekNextStartedActivity(); assertThat(startedActivity).isNotNull(); }