public void reset() {
        this.next = this.initial;
        this.mandatoryStopMade = false;
    }
@Test
    public void mandatoryStopTest() {
        Clock mockClock = Mockito.mock(Clock.class);

        Backoff backoff = new Backoff(
            100, TimeUnit.MILLISECONDS,
            60, TimeUnit.SECONDS,
            1900, TimeUnit.MILLISECONDS,
            mockClock
        );

        Mockito.when(mockClock.millis()).thenReturn(0L);
        assertTrue(checkExactAndDecrementTimer(backoff, 100));
        Mockito.when(mockClock.millis()).thenReturn(100L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 200));
        Mockito.when(mockClock.millis()).thenReturn(300L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 400));
        Mockito.when(mockClock.millis()).thenReturn(700L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 800));
        Mockito.when(mockClock.millis()).thenReturn(1500L);

        // would have been 1600 w/o the mandatory stop
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 400));
        Mockito.when(mockClock.millis()).thenReturn(1900L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 3200));
        Mockito.when(mockClock.millis()).thenReturn(3200L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 6400));
        Mockito.when(mockClock.millis()).thenReturn(3200L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 12800));
        Mockito.when(mockClock.millis()).thenReturn(6400L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 25600));
        Mockito.when(mockClock.millis()).thenReturn(12800L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 51200));
        Mockito.when(mockClock.millis()).thenReturn(25600L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 60000));
        Mockito.when(mockClock.millis()).thenReturn(51200L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 60000));
        Mockito.when(mockClock.millis()).thenReturn(60000L);

        backoff.reset();
        Mockito.when(mockClock.millis()).thenReturn(0L);
        assertTrue(checkExactAndDecrementTimer(backoff, 100));
        Mockito.when(mockClock.millis()).thenReturn(100L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 200));
        Mockito.when(mockClock.millis()).thenReturn(300L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 400));
        Mockito.when(mockClock.millis()).thenReturn(700L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 800));
        Mockito.when(mockClock.millis()).thenReturn(1500L);
        // would have been 1600 w/o the mandatory stop
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 400));

        backoff.reset();
        Mockito.when(mockClock.millis()).thenReturn(0L);
        assertTrue(checkExactAndDecrementTimer(backoff, 100));
        Mockito.when(mockClock.millis()).thenReturn(100L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 200));
        Mockito.when(mockClock.millis()).thenReturn(300L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 400));
        Mockito.when(mockClock.millis()).thenReturn(700L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 800));

        backoff.reset();
        Mockito.when(mockClock.millis()).thenReturn(0L);
        assertTrue(checkExactAndDecrementTimer(backoff, 100));
        Mockito.when(mockClock.millis()).thenReturn(100L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 200));
        Mockito.when(mockClock.millis()).thenReturn(300L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 400));
        Mockito.when(mockClock.millis()).thenReturn(700L);
        assertTrue(withinTenPercentAndDecrementTimer(backoff, 800));
    }