title: MockHttpServletRequestBuilder - how to change remoteAddress of remoteHost of HttpServletRequest?
body: <p>I'm trying to create mock request for integration test (@SpringBootTest). </p>
  
  <pre><code>//given     
  MockHttpServletRequestBuilder requestBuilder = get("/users/register/user1");
  </code></pre>
  
  <p>What I want to check is the remote of this request. In my controller Im getting this information from <em>HttpServletRequest</em> </p>
  
  <pre><code>HttpServletRequest request;
  request.getRemoteHost();
  request.getRemoteAddr();
  </code></pre>
  
  <p>Unfortunately right now <code>getRemoteHost()</code> will always return <strong><em>localhost</em></strong>.</p>
  
  <p>I would like to change it in my mock request to something else eg: </p>
  
  <blockquote>
    <p>remoteHost: <code>localhost</code> --> <code>mockhostdomain</code></p>
    
    <p>remoteAddr: <code>127.0.0.1</code> --> <code>10.32.120.7</code> (anything different)</p>
  </blockquote>
  
  <p>I cannot find proper method for that. <strong>Is it even possible?</strong></p>