assertEquals( "paragraph", ( it.next() ).getName() );
assertEquals( "bold", ( it.next() ).getName() );
assertEquals( "text", ( it.next() ).getName() );
assertEquals( "bold_", ( it.next() ).getName() );
SinkEventElement el = it.next();
assertEquals( "text", el.getName() );
assertEquals( " ", (String) el.getArgs()[0] );
assertEquals( "italic", ( it.next() ).getName() );
assertEquals( "text", ( it.next() ).getName() );
assertEquals( "italic_", ( it.next() ).getName() );
assertEquals( "paragraph_", ( it.next() ).getName() );
assertFalse( it.hasNext() );
// same test with EOL
text = "<para><command>word</command>" + EOL + "<emphasis>word</emphasis></para>";
sink.reset();
parser.parse( text, sink );
it = sink.getEventList().iterator();
assertEquals( "paragraph", ( it.next() ).getName() );
assertEquals( "bold", ( it.next() ).getName() );
assertEquals( "text", ( it.next() ).getName() );
assertEquals( "bold_", ( it.next() ).getName() );
el = it.next();
assertEquals( "text", el.getName() );
assertEquals( EOL, (String) el.getArgs()[0] );
assertEquals( "italic", ( it.next() ).getName() );
assertEquals( "text", ( it.next() ).getName() );
assertEquals( "italic_", ( it.next() ).getName() );
assertEquals( "paragraph_", ( it.next() ).getName() );