public static Builder builder() {
    return new Builder();
  }
@Test
  void throwsOriginalExceptionAfterFailedRetries() throws Exception {
    server.enqueue(new MockResponse().setResponseCode(503).setBody("foo 1"));
    server.enqueue(new MockResponse().setResponseCode(503).setBody("foo 2"));

    final String message = "the innerest";

    TestInterface api =
        Feign.builder().exceptionPropagationPolicy(UNWRAP).retryer(new Retryer.Default(1, 1, 2))
            .errorDecoder((methodKey, response) -> new RetryableException(response.status(),
                "play it again sam!",
                HttpMethod.POST, new TestInterfaceException(message), NON_RETRYABLE,
                response.request()))
            .target(TestInterface.class, "http://localhost:" + server.getPort());
    TestInterfaceException exception = assertThrows(TestInterfaceException.class, () -> api.post());
    assertThat(exception.getMessage()).contains(message);
  }