@Test
public void throwsFeignExceptionWithoutBody() {

  server.enqueue(new MockResponse().setBody("success!"));
  TestInterface api = Feign.builder()
      .decoder((response, type) -> {
        throw new IOException("timeout");
      })
      .target(TestInterface.class, "http://localhost:" + server.getPort());
  try {
    api.noContent();
  } catch (FeignException e) {
    assertThat(e.getMessage())
        .isEqualTo("timeout reading POST http://localhost:" + server.getPort() + "/");
    assertThat(e.contentUTF8()).isEqualTo("");
  }
}