### Question:
RequireScrollMixin implements Mixin { public void requireScrollWithNavigationBar(@NonNull final NavigationBar navigationBar) { setOnRequireScrollStateChangedListener( new OnRequireScrollStateChangedListener() { @Override public void onRequireScrollStateChanged(boolean scrollNeeded) { navigationBar.getMoreButton().setVisibility(scrollNeeded ? View.VISIBLE : View.GONE); navigationBar.getNextButton().setVisibility(scrollNeeded ? View.GONE : View.VISIBLE); } }); navigationBar.getMoreButton().setOnClickListener(createOnClickListener(null)); requireScroll(); } 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:
@Test public void testRequireScrollWithNavigationBar() { final NavigationBar navigationBar = new NavigationBar(application); requireScrollMixin.requireScrollWithNavigationBar(navigationBar); requireScrollMixin.notifyScrollabilityChange(true); assertWithMessage("More button should be visible") .that(navigationBar.getMoreButton().getVisibility()) .isEqualTo(View.VISIBLE); assertWithMessage("Next button should be hidden") .that(navigationBar.getNextButton().getVisibility()) .isEqualTo(View.GONE); navigationBar.getMoreButton().performClick(); verify(delegate).pageScrollDown(); requireScrollMixin.notifyScrollabilityChange(false); assertWithMessage("More button should be hidden") .that(navigationBar.getMoreButton().getVisibility()) .isEqualTo(View.GONE); assertWithMessage("Next button should be visible") .that(navigationBar.getNextButton().getVisibility()) .isEqualTo(View.VISIBLE); }