Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 13608)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 13609)
@@ -65,4 +65,6 @@
     private static final String PROJ_LIB_DIR = "data_nodist/projection";
 
+    private static final int MAX_LENGTH = 524288;
+
     private static class RefEntry {
         String code;
@@ -361,6 +363,11 @@
         }
         if (fail.length() > 0) {
-            System.err.println(fail.toString());
-            throw new AssertionError(fail.toString());
+            String s = fail.toString();
+            if (s.length() > MAX_LENGTH) {
+                // SonarQube/Surefire can't parse XML attributes longer than 524288 characters
+                s = s.substring(0, MAX_LENGTH - 4) + "...";
+            }
+            System.err.println(s);
+            throw new AssertionError(s);
         }
     }
