OptionalExtraBuilder { @NonNull public T subject(@NonNull String subject) { builder.subject(subject); return getSelf(); } OptionalExtraBuilder(ShareIntentBuilder builder); @NonNull T subject(@NonNull String subject); @NonNull T email(@NonNull String emailAddress); @NonNull T email(@NonNull Collection<String> emailAddresses); @NonNull T to(@NonNull String emailAddress); @NonNull T to(@NonNull Collection<String> emailAddresses); @NonNull T cc(@NonNull String emailAddress); @NonNull T cc(@NonNull Collection<String> emailAddresses); @NonNull T bcc(@NonNull String emailAddress); @NonNull T bcc(@NonNull Collection<String> emailAddresses);  }
@Test public void subjectShouldCallThroughToShareIntentBuilder() { TestOptionalExtraBuilder returnedBuilder = optionalExtraBuilder.subject(DEMO_SUBJECT); verify(builder).subject(DEMO_SUBJECT); assertThat(returnedBuilder).isSameAs(optionalExtraBuilder); }