JspAutotagRuntime extends SimpleTagSupport implements AutotagRuntime<Request> { @Override public <T> T getParameter(String name, Class<T> type, T defaultValue) { throw new UnsupportedOperationException("the parameters are injected into the tag itself, no need to fetch them"); }  @Override void doTag(); @Override Request createRequest(); @Override ModelBody createModelBody(); @Override T getParameter(String name, Class<T> type, T defaultValue);  }
@Test(expected = UnsupportedOperationException.class) public void testGetParameter() { JspFragment jspBody = createMock(JspFragment.class); JspContext jspContext = createMock(JspContext.class); JspTag parent = createMock(JspTag.class); replay(jspBody, jspContext, parent); JspAutotagRuntime runtime = new JspAutotagRuntime(); runtime.setJspBody(jspBody); runtime.setJspContext(jspContext); runtime.setParent(parent); runtime.doTag(); runtime.getParameter("test", Object.class, null); verify(jspBody, jspContext, parent); }