BackOff { void reset() { mRetry = INITIAL_RETRY_VALUE; mSharedPref.save(KEY_RETRY_COUNT, mRetry); mSharedPref.save(KEY_LAST_TICK, LAST_TICK_RESET_VALUE); } BackOff(Context context); static BackOff getInstance(Context context); boolean hasNext();  }
@Test public void testReset() { mBackOff.reset(); verify(mSharedPref, times(1)).save(anyString(), eq(mBackOff.INITIAL_RETRY_VALUE)); verify(mSharedPref, times(1)).save(anyString(), eq(mBackOff.LAST_TICK_RESET_VALUE)); }