@Test public void updateRetryTime_shouldUpdateRetryTimeUntilAt10Minutes() { int retryTime = 0; while (subject.mRetryTimeMilliseconds < maxRetryTime) { subject.updateRetryTime(); retryTime = subject.mRetryTimeMilliseconds; } assertThat(retryTime).isEqualTo(maxRetryTime); subject.updateRetryTime(); assertThat(retryTime).isEqualTo(subject.mRetryTimeMilliseconds); }
@VisibleForTesting void updateRetryTime() { mRetryTimeMilliseconds = (int) (mRetryTimeMilliseconds * EXPONENTIAL_BACKOFF_FACTOR); if (mRetryTimeMilliseconds > MAXIMUM_RETRY_TIME_MILLISECONDS) { mRetryTimeMilliseconds = MAXIMUM_RETRY_TIME_MILLISECONDS; } }
NativeAdSource { @VisibleForTesting void updateRetryTime() { mRetryTimeMilliseconds = (int) (mRetryTimeMilliseconds * EXPONENTIAL_BACKOFF_FACTOR); if (mRetryTimeMilliseconds > MAXIMUM_RETRY_TIME_MILLISECONDS) { mRetryTimeMilliseconds = MAXIMUM_RETRY_TIME_MILLISECONDS; } } }
NativeAdSource { @VisibleForTesting void updateRetryTime() { mRetryTimeMilliseconds = (int) (mRetryTimeMilliseconds * EXPONENTIAL_BACKOFF_FACTOR); if (mRetryTimeMilliseconds > MAXIMUM_RETRY_TIME_MILLISECONDS) { mRetryTimeMilliseconds = MAXIMUM_RETRY_TIME_MILLISECONDS; } } NativeAdSource(); @VisibleForTesting  NativeAdSource(@NonNull final List<TimestampWrapper<NativeResponse>> nativeAdCache,
            @NonNull final Handler replenishCacheHandler); }
NativeAdSource { @VisibleForTesting void updateRetryTime() { mRetryTimeMilliseconds = (int) (mRetryTimeMilliseconds * EXPONENTIAL_BACKOFF_FACTOR); if (mRetryTimeMilliseconds > MAXIMUM_RETRY_TIME_MILLISECONDS) { mRetryTimeMilliseconds = MAXIMUM_RETRY_TIME_MILLISECONDS; } } NativeAdSource(); @VisibleForTesting  NativeAdSource(@NonNull final List<TimestampWrapper<NativeResponse>> nativeAdCache,
            @NonNull final Handler replenishCacheHandler);  }
NativeAdSource { @VisibleForTesting void updateRetryTime() { mRetryTimeMilliseconds = (int) (mRetryTimeMilliseconds * EXPONENTIAL_BACKOFF_FACTOR); if (mRetryTimeMilliseconds > MAXIMUM_RETRY_TIME_MILLISECONDS) { mRetryTimeMilliseconds = MAXIMUM_RETRY_TIME_MILLISECONDS; } } NativeAdSource(); @VisibleForTesting  NativeAdSource(@NonNull final List<TimestampWrapper<NativeResponse>> nativeAdCache,
            @NonNull final Handler replenishCacheHandler);   }