@Test
public void testCreateRequest() {

    JspFragment jspBody = createMock(JspFragment.class);
    PageContext pageContext = createMock(PageContext.class);
    JspTag parent = createMock(JspTag.class);
    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    HttpServletRequest httpServletRequest = createMock(HttpServletRequest.class);
    HttpServletResponse httpServletResponse = createMock(HttpServletResponse.class);
    expect(pageContext.getAttribute(
            ApplicationAccess.APPLICATION_CONTEXT_ATTRIBUTE,
            PageContext.APPLICATION_SCOPE)).andReturn(applicationContext);
    expect(pageContext.getRequest()).andReturn(httpServletRequest);
    expect(pageContext.getResponse()).andReturn(httpServletResponse);
    replay(jspBody, pageContext, parent, applicationContext, httpServletRequest, httpServletResponse);
    JspAutotagRuntime runtime = new JspAutotagRuntime();
    runtime.setJspBody(jspBody);
    runtime.setJspContext(pageContext);
    runtime.setParent(parent);
    runtime.doTag();
    Request jspRequest = runtime.createRequest();
    assertTrue(jspRequest instanceof JspRequest);
    verify(jspBody, pageContext, parent, applicationContext, httpServletRequest, httpServletResponse);
}