h2 = (HtmlHeading2) elementIterator.next();
assertNotNull( h2 );
// Note: htmlunit strips the white space, actual result is ok
assertEquals( "Section formatting: italicboldmono", h2.asText().trim() );
HtmlItalic italic = (HtmlItalic) elementIterator.next();
assertEquals( "i", italic.getTagName() );
assertEquals( "italic", italic.asText().trim() );
HtmlBold bold = (HtmlBold) elementIterator.next();
assertEquals( "b", bold.getTagName() );
assertEquals( "bold", bold.asText().trim() );
HtmlTeletype tt = (HtmlTeletype) elementIterator.next();
assertEquals( "tt", tt.getTagName() );
assertEquals( "mono", tt.asText().trim() );
a = (HtmlAnchor) elementIterator.next();
assertEquals( "Section_formatting:_italic_bold_mono", a.getAttribute( "name" ) );
div = (HtmlDivision) elementIterator.next();
assertEquals( "section", div.getAttribute( "class" ) );
HtmlHeading3 h3 = (HtmlHeading3) elementIterator.next();
assertNotNull( h3 );
// Note: htmlunit strips the white space, actual result is ok
assertEquals( "SubSection formatting: italicboldmono", h3.asText().trim() );
italic = (HtmlItalic) elementIterator.next();
assertEquals( "i", italic.getTagName() );
assertEquals( "italic", italic.asText().trim() );
bold = (HtmlBold) elementIterator.next();
assertEquals( "b", bold.getTagName() );
assertEquals( "bold", bold.asText().trim() );
tt = (HtmlTeletype) elementIterator.next();
assertEquals( "tt", tt.getTagName() );
assertEquals( "mono", tt.asText().trim() );
a = (HtmlAnchor) elementIterator.next();
assertEquals( "SubSection_formatting:_italic_bold_mono", a.getAttribute( "name" ) );
p = (HtmlParagraph) elementIterator.next();
assertNotNull( p );
italic = (HtmlItalic) elementIterator.next();
assertEquals( "i", italic.getTagName() );
assertEquals( "italic", italic.asText().trim() );
bold = (HtmlBold) elementIterator.next();
assertEquals( "b", bold.getTagName() );
assertEquals( "bold", bold.asText().trim() );