JspAutotagRuntime extends SimpleTagSupport implements AutotagRuntime<Request> { @Override public ModelBody createModelBody() { return new JspModelBody(getJspBody(), getJspContext()); }  @Override void doTag(); @Override Request createRequest(); @Override ModelBody createModelBody(); @Override T getParameter(String name, Class<T> type, T defaultValue);  }
@Test public void testCreateModelBody() { JspFragment jspBody = createMock(JspFragment.class); JspContext jspContext = createMock(JspContext.class); JspTag parent = createMock(JspTag.class); JspWriter writer = createMock(JspWriter.class); expect(jspContext.getOut()).andReturn(writer); replay(jspBody, jspContext, parent, writer); JspAutotagRuntime runtime = new JspAutotagRuntime(); runtime.setJspBody(jspBody); runtime.setJspContext(jspContext); runtime.setParent(parent); runtime.doTag(); ModelBody jspModelBody = runtime.createModelBody(); assertTrue(jspModelBody instanceof JspModelBody); verify(jspBody, jspContext, parent, writer); }