@Test
public void ensureRetryerClonesItself() throws Exception {

  server.enqueue(new MockResponse().setResponseCode(503).setBody("foo 1"));
  server.enqueue(new MockResponse().setResponseCode(200).setBody("foo 2"));
  server.enqueue(new MockResponse().setResponseCode(503).setBody("foo 3"));
  server.enqueue(new MockResponse().setResponseCode(200).setBody("foo 4"));
  MockRetryer retryer = new MockRetryer();
  TestInterface api = Feign.builder()
      .retryer(retryer)
      .errorDecoder(new ErrorDecoder() {
        @Override
        public Exception decode(String methodKey, Response response) {
          return new RetryableException(response.status(), "play it again sam!", HttpMethod.POST,
              null, response.request());
        }
      }).target(TestInterface.class, "http://localhost:" + server.getPort());
  api.post();
  api.post(); // if retryer instance was reused, this statement will throw an exception
  assertEquals(4, server.getRequestCount());
}