public void testGeneratorWithId() throws Exception {
IteratorGeneratorTag tag = new IteratorGeneratorTag();
tag.setPageContext(pageContext);
tag.setVal("%{'aaa,bbb,ccc,ddd,eee'}");
tag.setId("myPageContextAttId");
tag.doStartTag();
tag.doEndTag();
Object pageContextIterator = pageContext.getAttribute("myPageContextAttId");
assertTrue(pageContextIterator instanceof Iterator);