@Test
public void shouldUseGivenMaxValue() throws Exception {

    RequestException exception = mock(RequestException.class);
    assertTrue(toTest.retry(exception, 1));
    assertTrue(toTest.retry(exception, 2));
    assertFalse(toTest.retry(exception, 3));
}