### Question:
RequireScrollMixin implements Mixin { public void requireScrollWithButton( @NonNull Button button, @StringRes int moreText, @Nullable OnClickListener onClickListener) { requireScrollWithButton(button, button.getContext().getText(moreText), onClickListener); } RequireScrollMixin(@NonNull TemplateLayout templateLayout); void setScrollHandlingDelegate(@NonNull ScrollHandlingDelegate delegate); void setOnRequireScrollStateChangedListener(
      @Nullable OnRequireScrollStateChangedListener listener); OnRequireScrollStateChangedListener getOnRequireScrollStateChangedListener(); OnClickListener createOnClickListener(@Nullable final OnClickListener listener); void requireScrollWithNavigationBar(@NonNull final NavigationBar navigationBar); void requireScrollWithButton(
      @NonNull Button button, @StringRes int moreText, @Nullable OnClickListener onClickListener); void requireScrollWithButton(
      @NonNull final Button button,
      final CharSequence moreText,
      @Nullable OnClickListener onClickListener); boolean isScrollingRequired(); void requireScroll();  }### Answer:
@SuppressLint("SetTextI18n") @Test public void testRequireScrollWithButton() { final Button button = new Button(application); button.setText("OriginalLabel"); OnClickListener wrappedListener = mock(OnClickListener.class); requireScrollMixin.requireScrollWithButton(button, "TestMoreLabel", wrappedListener); assertWithMessage("Button label should be kept initially") .that(button.getText().toString()) .isEqualTo("OriginalLabel"); requireScrollMixin.notifyScrollabilityChange(true); assertThat(button.getText().toString()).isEqualTo("TestMoreLabel"); button.performClick(); verify(wrappedListener, never()).onClick(eq(button)); verify(delegate).pageScrollDown(); requireScrollMixin.notifyScrollabilityChange(false); assertThat(button.getText().toString()).isEqualTo("OriginalLabel"); button.performClick(); verify(wrappedListener).onClick(eq(button)); }