@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)));
}