+ String previousLine = "";
+ for (String line : output.split("\n")) {
+ if (line.contains("(...")) {
+ assertThat(previousLine.contains("(...)")).isFalse();
+ }
+ previousLine = line;
+ }
+
+ // assert that the sorting works - the x3 is shown before the x1
+ assertThat(output).contains(" DataBroker : newReadWriteTransaction()\n 3x");
+