ComponentTag extends ParamAndPropertyAncestorTagImpl { @Override public int doEndTag() throws JspException { try { _renderJavaScript(); } catch (Exception exception) { throw new JspException(exception); } finally { cleanUp(); } return EVAL_PAGE; }  @Override int doEndTag(); @Override int doStartTag(); String getComponentId(); String getContainerId(); String getModule(); boolean isDestroyOnNavigate(); @Override void release(); void setComponentId(String componentId); void setContainerId(String containerId); void setContext(Map<String, Object> context); void setDestroyOnNavigate(boolean destroyOnNavigate); void setModule(String module); @Override void setServletContext(ServletContext servletContext);  }
@Test public void testDoEndTag() throws Exception { ComponentTag componentTag = new ComponentTag(); HttpServletRequest httpServletRequest = _getHttpServletRequest(); componentTag.setComponentId("componentId"); componentTag.setContext(Collections.singletonMap("name", "value")); componentTag.setModule("module"); componentTag.setPageContext( new MockPageContext(_getServletContext(), httpServletRequest)); componentTag.doEndTag(); Assert.assertEquals( _read("dependencies/component_tag.html"), _toString( (ScriptData)httpServletRequest.getAttribute( WebKeys.AUI_SCRIPT_DATA))); }