Test that the service method stores the request, response and servlet context
in the {@link com.opensymphony.xwork2.ActionContext}
MockControl mockRequest = MockControl.createNiceControl(HttpServletRequest.class);
MockControl mockResponse = MockControl.createNiceControl(HttpServletResponse.class);
MockControl mockContext = MockControl.createNiceControl(ServletContext.class);
MockControl mockConfig = MockControl.createNiceControl(ServletConfig.class);
HttpServletRequest req = (HttpServletRequest)mockRequest.getMock();
HttpServletResponse res = (HttpServletResponse)mockResponse.getMock();
ServletContext context = (ServletContext)mockContext.getMock();
ServletConfig config = (ServletConfig)mockConfig.getMock();
mockConfig.expectAndDefaultReturn(config.getServletContext(), context);
mockConfig.replay();
PreparatorServlet servlet = new PreparatorServlet();
servlet.init(config);
servlet.service(req, res);
assertSame(req, ServletActionContext.getRequest());
assertSame(res, ServletActionContext.getResponse());
assertSame(context, ServletActionContext.getServletContext());
mockConfig.verify();