### Question:
RecyclerViewScrollHandlingDelegate implements ScrollHandlingDelegate { @Override public void startListening() { if (this.recyclerView != null) { this.recyclerView.addOnScrollListener( new RecyclerView.OnScrollListener() { @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy) { requireScrollMixin.notifyScrollabilityChange(canScrollDown()); } }); if (canScrollDown()) { requireScrollMixin.notifyScrollabilityChange(true); } } else { Log.w(TAG, "Cannot require scroll. Recycler view is null."); } } RecyclerViewScrollHandlingDelegate(
      @NonNull RequireScrollMixin requireScrollMixin, @Nullable RecyclerView recyclerView); @Override void startListening(); @Override void pageScrollDown();  }### Answer:
@Test public void testRequireScroll() { mDelegate.startListening(); verify(mRequireScrollMixin).notifyScrollabilityChange(true); }
@Test public void testScrolledToBottom() { mDelegate.startListening(); verify(mRequireScrollMixin).notifyScrollabilityChange(true); doReturn(20).when(mRecyclerView).computeVerticalScrollOffset(); mListenerCaptor.getValue().onScrolled(mRecyclerView, 0, 20); verify(mRequireScrollMixin).notifyScrollabilityChange(false); }