ShareIntent extends BaseIntent<ShareIntent> { @Override protected boolean onStartWith(@NonNull final IntentStarter starter, @NonNull final Intent intent) { return super.onStartWith(starter, Intent.createChooser(intent, dialogTitle)); }  ShareIntent content(@Nullable final CharSequence text); @NonNull CharSequence content(); ShareIntent uri(@Nullable final Uri uri); @Nullable Uri uri(); ShareIntent uris(@NonNull final Uri... uris); ShareIntent uris(@Nullable final List<Uri> uris); @NonNull List<Uri> uris(); ShareIntent mimeType(@NonNull @MimeType.Value final String type); @NonNull @MimeType.Value String mimeType(); ShareIntent title(@Nullable final CharSequence title); @NonNull CharSequence title();  }
@Test public void testOnStartWith() { final ShareIntent shareIntent = new ShareIntent(); shareIntent.content("Text to share."); final Intent intent = shareIntent.build(context); final IntentStarter mockStarter = mock(IntentStarter.class); shareIntent.onStartWith(mockStarter, intent); verify(mockStarter).startIntent(any(Intent.class)); }