title: Mock HttpResponse with redirect
body: <p>How to create org.apache.http.HttpResponse object that looks like response from web page that returns 301 MOVED_PERMANENTLY. </p>
  
  <p>Most important - where to put redirection url?</p>
  
  <p>I am testing web crawling application. I have created mock for my HttpClient in which I want to create response that will simulate one that will be returned when web page was redirected for example from http to https or to other domain. </p>
  
  <p>For example for 200 OK I create response that way:</p>
  
  <pre><code>private  ProtocolVersion http11 = new ProtocolVersion("HTTP", 1, 1);
  private  StatusLine HTTP_200_OK = new BasicStatusLine(http11, response.Status.OK.getStatusCode(), Response.Status.OK.getReasonPhrase());
  BasicHttpResponse response = new BasicHttpResponse(HTTP_200_OK);
  </code></pre>
  
  <p>but I have problem where to put redirection url.</p>