@Test
public void testExponentialBackoffForRetryable_andStopEventuallyBecauseItNeverWorks() throws B2Exception {

    final Guts guts = new Guts(
            tooManyRequests(null),
            serviceUnavailable(null),
            internalError(),
            requestTimeout(null),
            tooManyRequests(null),
            connectFailed(),
            connectionBroken(),
            socketTimeout()
    );
    boolean caughtIt = false;
    try {
        retryer.doRetry(OP, goodAuthCache, guts, new B2DefaultRetryPolicy());
    } catch (B2Exception e) {
        assertEquals(8, guts.getCallCount());
        assertTrue(e == guts.getAsException(7));
        verify(goodAuthCache, never()).clear();
        // we're using the default policy here.  it doubles the backoff and stops after a while.
        // this verifies that if the policy says to stop retrying, we do.
        verify(sleeper, times(1)).sleepSeconds(1);
        verify(sleeper, times(1)).sleepSeconds(2);
        verify(sleeper, times(1)).sleepSeconds(4);
        verify(sleeper, times(1)).sleepSeconds(8);
        verify(sleeper, times(1)).sleepSeconds(16);
        verify(sleeper, times(1)).sleepSeconds(32);
        verify(sleeper, times(1)).sleepSeconds(64);
        verifyNoMoreInteractions(sleeper);
        caughtIt = true;
    }
    assertTrue(caughtIt);
}