@Override
    @SuppressWarnings("unchecked")
    public HttpRestResult<T> convertResult(HttpClientResponse response, Type responseType) throws Exception {
        final Header headers = response.getHeaders();
        InputStream body = response.getBody();
        T extractBody = JacksonUtils.toObj(body, responseType);
        HttpRestResult<T> httpRestResult = convert((RestResult<T>) extractBody);
        httpRestResult.setHeader(headers);
        return httpRestResult;
    }
@Test
    void testConvertResult() throws Exception {
        RestResult<String> testCase = RestResult.<String>builder().withCode(200).withData("ok").withMsg("msg").build();
        InputStream inputStream = new ByteArrayInputStream(JacksonUtils.toJsonBytes(testCase));
        HttpClientResponse response = mock(HttpClientResponse.class);
        when(response.getBody()).thenReturn(inputStream);
        when(response.getHeaders()).thenReturn(Header.EMPTY);
        when(response.getStatusCode()).thenReturn(200);
        RestResultResponseHandler<String> handler = new RestResultResponseHandler<>();
        handler.setResponseType(RestResult.class);
        HttpRestResult<String> actual = handler.handle(response);
        assertEquals(testCase.getCode(), actual.getCode());
        assertEquals(testCase.getData(), actual.getData());
        assertEquals(testCase.getMessage(), actual.getMessage());
        assertEquals(Header.EMPTY, actual.getHeader());
    }