TextAndStreamBuilder extends OptionalExtraBuilder<TextAndStreamBuilder> implements AcceptsSingleExtraText<StreamBuilder>, AcceptsExtraStream<TextAndStreamBuilder>, Buildable { @NonNull @Override public StreamBuilder text(@NonNull String text) { builder.text(text); return new StreamBuilder(builder); } TextAndStreamBuilder(ShareIntentBuilder builder); @NonNull @Override TextAndStreamBuilder stream(@NonNull Uri stream); @NonNull @Override TextAndStreamBuilder stream(@NonNull Uri stream, @NonNull String type); @NonNull @Override StreamBuilder text(@NonNull String text); @NonNull @Override Intent build(); @Override void share(); @Override void share(@NonNull CharSequence title);  }
@Test public void textShouldCallThroughToShareIntentBuilder() { StreamBuilder returnedBuilder = textAndStreamBuilder.text(DEMO_TEXT); verify(builder).text(DEMO_TEXT); assertThat(returnedBuilder.builder).isSameAs(builder); }