title: Creating a mock HttpServletRequest out of a url string?
body: <p>I have a service that does some work on an HttpServletRequest object, specifically using the request.getParameterMap and request.getParameter to construct an object.</p>
  
  <p>I was wondering if there is a straightforward way to take a provided url, in the form of a string, say </p>
  
  <pre><code>String url = "http://www.example.com/?param1=value1&amp;param";
  </code></pre>
  
  <p>and easily convert it to a HttpServletRequest object so that I can test it with my unit tests? Or at least just so that request.getParameterMap and request.getParameter work correctly?</p>