/**
  * Extracts the headers from the given HttpResponse.
  *
  * @param response the HttpResponse to get the headers from
  * @return A map of the headers found on the HttpResponse
  */
 public static CaseInsensitiveMap<String> extractHeaders(Response response) {
   CaseInsensitiveMap<String> headers = new CaseInsensitiveMap<String>();
   FluentCaseInsensitiveStringsMap headerMap = response.getHeaders();
   for (String headerName : headerMap.keySet()) {
     for (String headerValue : headerMap.get(headerName)) {
       headers.add(headerName, headerValue);
     }
   }
   return headers;
 }