TextAndStreamNoBuilder extends OptionalExtraBuilder<TextAndStreamNoBuilder> implements AcceptsSingleExtraText<StreamBuilder>, AcceptsExtraStream<TextAndStreamBuilder> { @NonNull @Override public TextAndStreamBuilder stream(@NonNull Uri stream) { return new TextAndStreamBuilder(builder).stream(stream); } TextAndStreamNoBuilder(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);  }
@Test public void streamShouldCreateTextAndStreamBuilder() { TextAndStreamBuilder returnedBuilder = textAndStreamNoBuilder.stream(DEMO_STREAM); verify(builder).stream(DEMO_STREAM); assertThat(returnedBuilder.builder).isSameAs(builder); }
@Test public void streamWithTypeShouldCreateTextAndStreamBuilder() { TextAndStreamBuilder returnedBuilder = textAndStreamNoBuilder.stream(DEMO_STREAM, DEMO_TYPE); verify(builder).stream(DEMO_STREAM, DEMO_TYPE); assertThat(returnedBuilder.builder).isSameAs(builder); }