@Test public void testInvokeWriter() throws MethodInvocationException, ResourceNotFoundException, ParseErrorException, IOException, JspException { PageContext pageContext = createMock(PageContext.class); ASTBlock block = createMock(ASTBlock.class); InternalContextAdapter context = createMock(InternalContextAdapter.class); Writer writer = createMock(Writer.class); expect(block.render(context, writer)).andReturn(true); replay(pageContext, block, context, writer); VelocityJspFragment fragment = new VelocityJspFragment(pageContext, block, context); fragment.invoke(writer); verify(pageContext, block, context, writer); }
@Override public void invoke(Writer out) throws JspException, IOException { block.render(context, out); }
VelocityJspFragment extends JspFragment { @Override public void invoke(Writer out) throws JspException, IOException { block.render(context, out); } }
VelocityJspFragment extends JspFragment { @Override public void invoke(Writer out) throws JspException, IOException { block.render(context, out); } VelocityJspFragment(PageContext pageContext, ASTBlock block,
            InternalContextAdapter context); }
VelocityJspFragment extends JspFragment { @Override public void invoke(Writer out) throws JspException, IOException { block.render(context, out); } VelocityJspFragment(PageContext pageContext, ASTBlock block,
            InternalContextAdapter context); @Override void invoke(Writer out); @Override JspContext getJspContext(); }
VelocityJspFragment extends JspFragment { @Override public void invoke(Writer out) throws JspException, IOException { block.render(context, out); } VelocityJspFragment(PageContext pageContext, ASTBlock block,
            InternalContextAdapter context); @Override void invoke(Writer out); @Override JspContext getJspContext();  }