@Test
public void throwsRetryableExceptionIfNoUnderlyingCause() throws Exception {

  server.enqueue(new MockResponse().setResponseCode(503).setBody("foo 1"));
  server.enqueue(new MockResponse().setResponseCode(503).setBody("foo 2"));
  String message = "play it again sam!";
  thrown.expect(RetryableException.class);
  thrown.expectMessage(message);
  TestInterface api = Feign.builder()
      .exceptionPropagationPolicy(UNWRAP)
      .retryer(new Retryer.Default(1, 1, 2))
      .errorDecoder(new ErrorDecoder() {
        @Override
        public Exception decode(String methodKey, Response response) {
          return new RetryableException(response.status(), message, HttpMethod.POST, null,
              response.request());
        }
      }).target(TestInterface.class, "http://localhost:" + server.getPort());
  api.post();
}