@Test
  void provideInvocationHandlerFactory() throws Exception {
    server.enqueue(new MockResponse().setBody("response data"));

    String url = "http://localhost:" + server.getPort();

    final AtomicInteger callCount = new AtomicInteger();
    // noinspection rawtypes
    InvocationHandlerFactory factory =
        new InvocationHandlerFactory() {
          private final InvocationHandlerFactory delegate = new Default();

          @Override
          public InvocationHandler create(Target target, Map<Method, MethodHandler> dispatch) {
            callCount.incrementAndGet();
            return delegate.create(target, dispatch);
          }
        };

    TestInterface api =
        Feign.builder().invocationHandlerFactory(factory).target(TestInterface.class, url);
    Response response = api.codecPost("request data");
    assertThat(Util.toString(response.body().asReader(Util.UTF_8))).isEqualTo("response data");
    assertThat(callCount.get()).isEqualTo(1);

    assertThat(server.takeRequest()).hasBody("request data");
  }
Shows exception handling isn't required to coerce 204 to null or empty
core/src/test/java/feign/FeignBuilderTest.java