title: Building simple http-header for Junit test
body: <p>I'm trying to test a <code>HttpServletRequest</code> and for that I have used  <a href="http://code.google.com/p/mockito/" rel="noreferrer">Mockito</a> as follow:</p>
  
  <pre><code>HttpServletRequest  mockedRequest = Mockito.mock(HttpServletRequest.class);
  </code></pre>
  
  <p>now before putting the http-request in <code>assert</code> methods I just want to build a simple http header as below without starting a real server:</p>
  
  <pre><code>x-real-ip:127.0.0.1
  host:example.com
  x-forwarded-for:127.0.0.1
  accept-language:en-US,en;q=0.8
  cookie:JSESSIONID=&lt;session_ID&gt;
  </code></pre>
  
  <p>can some one help how can I build such a test header? thanks.</p>