@Test
public void testCreateVelocityRequest() {

    HttpServletRequest httpRequest = createMock(HttpServletRequest.class);
    HttpServletResponse response = createMock(HttpServletResponse.class);
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    replay(velocityContext, httpRequest, response, applicationContext);
    context = VelocityRequest.createVelocityRequest(applicationContext,
            httpRequest, response, velocityContext, writer);
    ServletRequest servletRequest = (ServletRequest) context.getWrappedRequest();
    assertEquals(httpRequest, servletRequest.getRequest());
    assertEquals(response, servletRequest.getResponse());
    verify(velocityContext, httpRequest, response, applicationContext);
}