title: How to add header in mock HTTPResponse
body: <pre><code>public HttpResponse mockHttpResponse(int status, Token token) throws Exception {
      HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
      StatusLine statusLine = mock(StatusLine.class);
      when(httpResponse.getStatusLine()).thenReturn(statusLine);
      when(statusLine.getStatusCode()).thenReturn(status);
      HttpEntity httpEntity = mock(HttpEntity.class);
      when(httpResponse.getEntity()).thenReturn(httpEntity);
      when(httpEntity.getContentType()).thenReturn(new BasicHeader(HTTP.CONTENT_TYPE, ContentType.APPLICATION_JSON.toString()),
              new BasicHeader(HttpHeaders.CACHE_CONTROL, &quot;100&quot;));
      ObjectMapper objectMapper = new ObjectMapper();
      byte[] bytes = objectMapper.writeValueAsBytes(token);
      when(httpEntity.getContent()).thenReturn(getInputStream(bytes));
      return httpResponse;
  }
  </code></pre>
  <p>I would like to retrieve <strong>response.containsHeader(HttpHeaders.CACHE_CONTROL)</strong>, but every time it is returning <strong>false</strong> in my test case execution. Please suggest how can I add <strong>HttpHeaders.CACHE_CONTROL</strong> as my mocked HttpResponse.</p>