TestMaController mc = new TestMaController();
MockHttpServletRequest request = new MockHttpServletRequest("GET", "/commandInSession.html");
request.addParameter("name", "rod");
request.addParameter("age", "32");
request.setSession(new MockHttpSession(null));
HttpServletResponse response = new MockHttpServletResponse();
ModelAndView mv = mc.handleRequest(request, response);
assertTrue("Invoked commandInSession method", mc.wasInvoked("commandInSession"));
assertTrue("view name is commandInSession", mv.getViewName().equals("commandInSession"));
assertTrue("Only one method invoked", mc.getInvokedMethods() == 1);