TextBuilder extends OptionalExtraBuilder<TextBuilder> implements AcceptsExtraText<TextBuilder>, Buildable { @NonNull @Override public TextBuilder text(@NonNull String text) { builder.text(text); return this; } TextBuilder(ShareIntentBuilder builder); @NonNull @Override TextBuilder text(@NonNull String text); @NonNull @Override TextBuilder text(@NonNull Collection<String> texts); @NonNull @Override Intent build(); @Override void share(); @Override void share(@NonNull CharSequence title);  }
@Test public void textShouldCallThroughToShareIntentBuilder() { TextBuilder returnedBuilder = textBuilder.text(DEMO_TEXT); verify(builder).text(DEMO_TEXT); assertThat(returnedBuilder).isSameAs(textBuilder); }
@Test public void textWithCollectionShouldCallThroughToShareIntentBuilder() { TextBuilder returnedBuilder = textBuilder.text(DEMO_TEXTS); verify(builder).text(DEMO_TEXTS); assertThat(returnedBuilder).isSameAs(textBuilder); }