@Test
@Parameters({ "500", "503", "599" })

public void shouldRetry5xx(int statusCode) throws IOException {
  when(response.getStatusCode()).thenReturn(statusCode).thenReturn(200);
  GoogleApiClientUtil.executeWithRetries(request, WaitStrategies.noWait(), StopStrategies.stopAfterAttempt(3));
  verify(request, times(2)).execute();
}