When you get a test failure it is very difficult to determine exactly which of the multiple events was the one with the mismatch, so compare a string version and then IDE's can give meaningful diff support

git-svn-id: https://svn.apache.org/repos/asf/maven/doxia/doxia/trunk@1572528 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java
index 0648432..43b01aa 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/parser/AbstractParserTest.java
@@ -138,10 +138,18 @@
 
     protected void assertEquals( Iterator<SinkEventElement> it, String... names )
     {
-        for ( String name: names )
+        StringBuilder expected = new StringBuilder();
+        StringBuilder actual = new StringBuilder();
+
+        for ( String name : names )
         {
-            assertEquals( name, it.next().getName() );
+            expected.append( name ).append( '\n' );
+            if ( it.hasNext() )
+            {
+                actual.append( it.next().getName() ).append( '\n' );
+            }
         }
+        assertEquals( expected.toString(), actual.toString() );
     }