最佳答案
I have a service that does some work on an HttpServletRequest object, specifically using the request.getParameterMap and request.getParameter to construct an object.
I was wondering if there is a straightforward way to take a provided url, in the form of a string, say
String url = "http://www.example.com/?param1=value1¶m";
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?