@Test
public void testCreateRequest() {

    InternalContextAdapter context = createMock(InternalContextAdapter.class);
    Writer writer = createMock(Writer.class);
    Node node = createMock(Node.class);
    ViewToolContext viewContext = createMock(ViewToolContext.class);
    HttpServletRequest request = createMock(HttpServletRequest.class);
    HttpServletResponse response = createMock(HttpServletResponse.class);
    ServletContext servletContext = createMock(ServletContext.class);
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    expect(context.getInternalUserContext()).andReturn(viewContext);
    expect(viewContext.getRequest()).andReturn(request);
    expect(viewContext.getResponse()).andReturn(response);
    expect(viewContext.getServletContext()).andReturn(servletContext);
    expect(servletContext.getAttribute(ApplicationAccess.APPLICATION_CONTEXT_ATTRIBUTE)).andReturn(applicationContext);
    replay(context, writer, node, viewContext, request, response, servletContext, applicationContext);
    VelocityAutotagRuntime runtime = new VelocityAutotagRuntime();
    runtime.render(context, writer, node);
    Request velocityRequest = runtime.createRequest();
    assertTrue(velocityRequest instanceof VelocityRequest);
    verify(context, writer, node, viewContext, request, response, servletContext, applicationContext);
}