@Test
@Parameters({ "400", "401", "403", "404" })

public void shouldNotRetry4xx(int statusCode) throws IOException {
  when(response.getStatusCode()).thenReturn(statusCode).thenReturn(200);
  try {
    GoogleApiClientUtil.executeWithRetries(request, WaitStrategies.noWait(), StopStrategies.stopAfterAttempt(3));
    fail();
  } catch (HttpResponseException e) {
    assertThat(e.getStatusCode(), is(statusCode));
  }
  verify(request, times(1)).execute();
}