Take a look at MockHttpServletRequest and MockHttpServletResponse in spring-mock.jar
There are a few options for testing. For integration tests, you can use AbstractDependencyInjectionSpringContextTests.
To test a smaller scope which is often pereferable, you can insert mocks (e.g. using EasyMock) for your services layer.
Here's an incomplete mock example:
Code:
//Add request data
request = new MockHttpServletRequest("POST", "/");
response = new MockHttpServletResponse();
request.addParameter("formInputName", "formValue");
...
//MockControl.createControl(MyService.class); in setUp
//Add mock behaviour
....
mc.setThrowable(new DuplicateException("mock"));
mc.replay();
//Now test controller
ModelAndView mv = myController.handleRequest(request, response);
BindException errors = (BindException) mv.getModel().get(BindException.ERROR_KEY_PREFIX+"command");
assertNotNull(errors);
And don't forget mc.verify() in your teardown.