I need to write unit test around a function which takes HttpServletRequest and HttpServletResponse object as an argument.
If I create the mock of these two object(request and response), how change in one will reflect in another.
Ex. If I want to unit test around the code where I am setting the header in response object.
response.addHeader("X-UA-Compatible", "IE=EmulateIE7");
Let me know how to proceed .