protected static HttpUriRequest postRequest(String url, Map<String, String> params, boolean supportEnhancedContentType) {
        HttpPost httpPost = new HttpPost(url);
        if (params != null && params.size() > 0) {
            List<NameValuePair> list = new ArrayList<>(params.size());
            for (Entry<String, String> entry : params.entrySet()) {
                list.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
            }
            httpPost.setEntity(new UrlEncodedFormEntity(list, Consts.UTF_8));
            if (!supportEnhancedContentType) {
                httpPost.setHeader(HTTP_HEADER_CONTENT_TYPE, HTTP_HEADER_CONTENT_TYPE_URLENCODED);
            }
        }
        return httpPost;
    }
@Test
    public void postRequest() throws HttpException, IOException {
        // Processor is required because it will determine the final request body including
        // headers before outgoing.
        RequestContent processor = new RequestContent();
        Map<String, String> params = new HashMap<String, String>();
        params.put("a", "1");
        params.put("b", "2+");
        params.put("c", "3 ");
        
        HttpUriRequest request;
        
        request = SentinelApiClient.postRequest("/test", params, false);
        assertNotNull(request);
        processor.process(request, null);
        assertNotNull(request.getFirstHeader("Content-Type"));
        assertEquals("application/x-www-form-urlencoded", request.getFirstHeader("Content-Type").getValue());
        
        request = SentinelApiClient.postRequest("/test", params, true);
        assertNotNull(request);
        processor.process(request, null);
        assertNotNull(request.getFirstHeader("Content-Type"));
        assertEquals("application/x-www-form-urlencoded; charset=UTF-8", request.getFirstHeader("Content-Type").getValue());
    }