*/
public class TagIdGeneratorTests extends TestCase {
public void testNextId() throws Exception {
String name = "foo";
PageContext pageContext = new MockPageContext();
assertEquals("foo1", TagIdGenerator.nextId(name, pageContext));
assertEquals("foo2", TagIdGenerator.nextId(name, pageContext));
assertEquals("foo3", TagIdGenerator.nextId(name, pageContext));
assertEquals("foo4", TagIdGenerator.nextId(name, pageContext));
assertEquals("bar1", TagIdGenerator.nextId("bar", pageContext));
pageContext = new MockPageContext();
assertEquals("foo1", TagIdGenerator.nextId(name, pageContext));
assertEquals("foo2", TagIdGenerator.nextId(name, pageContext));
assertEquals("foo3", TagIdGenerator.nextId(name, pageContext));
assertEquals("foo4", TagIdGenerator.nextId(name, pageContext));
assertEquals("bar1", TagIdGenerator.nextId("bar", pageContext));