Are you writing a
unit test or an integration test.
If you are writing a unit test, then you don't need to mock out the request or response, since the Controller with annotations is just a POJO and you can test the code out just like you test any other
Java class.
If you are writing an integration test, then yes you can mock out the request and response, but you also have to create a ModelMap object.
I am not sure why your code tags aren't working in your post.
Mark