@SuppressLint("SetTextI18n") // It's OK for testing
@Test
public void testRequireScrollWithButton() {

    final Button button = new Button(application);
    button.setText("OriginalLabel");
    OnClickListener wrappedListener = mock(OnClickListener.class);
    mRequireScrollMixin.requireScrollWithButton(
            button, "TestMoreLabel", wrappedListener);
    assertEquals("Button label should be kept initially", "OriginalLabel", button.getText());
    mRequireScrollMixin.notifyScrollabilityChange(true);
    assertEquals("TestMoreLabel", button.getText());
    button.performClick();
    verify(wrappedListener, never()).onClick(eq(button));
    verify(mDelegate).pageScrollDown();
    mRequireScrollMixin.notifyScrollabilityChange(false);
    assertEquals("OriginalLabel", button.getText());
    button.performClick();
    verify(wrappedListener).onClick(eq(button));
}