expect(request.getRequest()).andReturn(httpRequest);
expect(request.getResponse()).andReturn(response);
expect(view.createContext(httpRequest, response)).andReturn(context);
expect(view.getTemplate("/test.vm")).andReturn(template);
expect(request.getWriter()).andReturn(writer);
view.merge(template, context, writer);
replay(view, request, httpRequest, response, context, template, writer);
Renderer renderer = new VelocityRenderer(view);
renderer.render("/test.vm", request);
verify(view, request, httpRequest, response, context, template, writer);