@Override
    public void consumeResponse(final HttpResponse asyncResponse,
                                final EntityDetails entityDetails,
                                final HttpContext context,
                                final FutureCallback<Void> resultCallback) throws HttpException, IOException {
        callbackRef.set(resultCallback);
        final ResponseData responseData = new ResponseData(asyncResponse, entityDetails);
        responseRef.set(responseData);
        if (entityDetails != null) {
            bufferRef.set(new SharedInputBuffer(initialBufferSize));
        } else {
            fireComplete();
        }
        countDownLatch.countDown();
    }
TODO: to be replaced by core functionality
httpclient5/src/main/java/org/apache/hc/client5/http/impl/compat/ClassicToAsyncResponseConsumer.java