@Override
  public void onProgressChanged(SeekBar seek, int value, boolean fromTouch) {
    mValue = value + mMin;
    if (mValue > mMax) mValue = mMax;
    if (mValue < mMin) mValue = mMin;

    if (shouldPersist()) persistInt(mValue);
    callChangeListener(mValue);

    if (mCurrentValue != null)
      mCurrentValue.setText(String.format(Locale.ROOT, mValueTemplate, mValue));
  }
@Test
  public void testValueTemplateChanges() {
    runTest(
        () -> {
          TextView templateView = mTestPrefFragment.getView().findViewById(R.id.pref_current_value);
          Assert.assertNotNull(templateView);
          Assert.assertEquals("23 milliseconds", templateView.getText().toString());
          mTestSlide.onProgressChanged(
              Mockito.mock(SeekBar.class), 15 /*this is zero-based*/, false);
          Assert.assertEquals("27 milliseconds", templateView.getText().toString());
        });
  }