ToastBuilder { public ToastBuilder gravityOffsetY(int gravityOffsetY) { this.gravityOffsetY = gravityOffsetY; 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 whenGravityOffsetY_thenGravityOffsetYSet() { createBuilder(); int expected = -30; builderUnderTest.gravityOffsetY(expected); assertThat(builderUnderTest.gravityOffsetY).isEqualTo(expected); }