* @return the http response
*/
@SuppressWarnings("unchecked")
private HttpResponse buildHttpResponse() {
HttpResponseImpl response = new HttpResponseImpl();
if (this.response != null) {
response.setContentType((String) responseMessage.get(Message.CONTENT_TYPE));
response.setStatusCode(this.response.getStatus());
response.setEntity(this.response.getEntity());
response.setHeaders(getHeaders((Map<String, List<Object>>)
this.responseMessage.get(Message.PROTOCOL_HEADERS)));
}
return response;
}