@Test
public void constructPostHttpMethodWithCustomRequestConfig() throws UnsupportedEncodingException {

    final RequestConfig requestConfig = RequestConfig.custom().setMaxRedirects(42).build();
    HttpUriRequest request = client.constructHttpMethod("POST", "jest/post", "data", requestConfig);
    assertNotNull(request);
    assertEquals(requestConfig, ((HttpRequestBase) request).getConfig());
}