@Override
    public HttpRequest generateRequest() throws IOException, HttpException {
        return requestDecorateFunc.apply(httpAsyncRequestProducer.generateRequest());
    }
@Test
    public void generateRequest() throws HttpException, IOException {
        final HttpAsyncRequestProducer delegate = Mockito.mock(HttpAsyncRequestProducer.class);
        AtomicBoolean isExecute = new AtomicBoolean();
        final HttpRequest request = Mockito.mock(HttpRequest.class);
        final Function<HttpRequest, HttpRequest> function = httpRequest -> {
            isExecute.set(true);
            return request;
        };
        final HttpAsyncRequestProducerDecorator decorator = new HttpAsyncRequestProducerDecorator(
                delegate, function, null);
        final HttpRequest httpRequest = decorator.generateRequest();
        Assert.assertEquals(httpRequest, request);
        Assert.assertTrue(isExecute.get());
    }