assertEquals("Wrong url prefix",
new WBSAXString(codec, "http://www.my.com/page.jsp"),
(WBSAXString)events.next());
// Check jsessionid
StringReference stringReference1 = (StringReference)events.next();
assertEquals("Wrong url jsessionid",
new WBSAXString(codec, ";jsessionid=123"),
stringReference1.resolveString());
// Check suffix
assertEquals("Wrong url suffix",
new WBSAXString(codec, "?parm=value#ref"),
(WBSAXString)events.next());
// Check title
aStartCode = (AttributeStartCode)events.next();
assertEquals("Wrong AttributeStartCode integer", 0x36,
aStartCode.getInteger());
assertEquals("Wrong AttributeStartCode name", "title",
aStartCode.getName());
assertNull("Wrong AttributeStartCode value prefix",
aStartCode.getValuePrefix());
// Check title's value
assertEquals("Wrong title",
new WBSAXString(codec, "my title"),
(WBSAXString)events.next());
// Check href
aStartCode = (AttributeStartCode)events.next();
assertEquals("Wrong AttributeStartCode integer", 0x4A,
aStartCode.getInteger());
assertEquals("Wrong AttributeStartCode name", "href",
aStartCode.getName());
assertNull("Wrong AttributeStartCode value prefix",
aStartCode.getValuePrefix());
// Check prefix
assertEquals("Wrong url prefix",
new WBSAXString(codec, "http://www.my.com/page2.jsp"),
(WBSAXString)events.next());
// Check jsessionid, can now check logical and physical refs to ensure
// jsession id was added only once to string table
StringReference stringReference2 = (StringReference)events.next();
assertEquals("Wrong logical ref",
stringReference1.resolveLogicalIndex(),
stringReference2.resolveLogicalIndex());
assertEquals("Wrong physical ref",
stringReference1.resolvePhysicalIndex(),
stringReference2.resolvePhysicalIndex());
assertEquals("Wrong url jsessionid",
new WBSAXString(codec, ";jsessionid=123"),
stringReference2.resolveString());
// Check suffix
assertEquals("Wrong url suffix",
new WBSAXString(codec, "?parm=value#ref2"),
events.next());