BeanTag tag = new BeanTag();
tag.setPageContext(pageContext);
tag.setName("org.apache.struts2.TestAction");
try {
tag.doStartTag();
tag.component.addParameter("result", "success");
assertEquals("success", stack.findValue("result"));
// TestAction from bean tag, Action from execution and DefaultTextProvider
assertEquals(3, stack.size());
tag.doEndTag();
assertEquals(2, stack.size());
} catch (JspException ex) {
ex.printStackTrace();
fail();
}
request.verify();
pageContext.verify();