ToastBuilder { public ToastBuilder customView(View customView) { this.customView = customView; return this; } ToastBuilder(Context context); ToastBuilder customView(View customView); ToastBuilder customViewMessageViewId(int customViewMessageViewId); ToastBuilder message(CharSequence message); ToastBuilder message(@StringRes int messageResId); ToastBuilder messageTextColor(@ColorInt int messageTextColor); ToastBuilder messageTextColorRes(@ColorRes int messageTextColorResId); ToastBuilder duration(int duration); ToastBuilder gravity(int gravity); ToastBuilder gravityOffsetX(int gravityOffsetX); ToastBuilder gravityOffsetY(int gravityOffsetY); @SuppressLint("ShowToast") Toast build();  }
@Test public void whenCustomView_thenCustomViewSet() { createBuilder(); View customView = new View(RuntimeEnvironment.application); builderUnderTest.customView(customView); assertThat(builderUnderTest.customView).isEqualTo(customView); }