Make assertConnection failures easier to debug

Change-Id: I0f3934826c7464ec3d3c4f3d206a75ab53ce4ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
diff --git a/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart b/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
index b08b808..22acec6 100644
--- a/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
+++ b/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
@@ -37,7 +37,8 @@
   /// Checks that there is a connection from [sourceNode] to [destinationNode].
   void assertConnection(
       NullabilityNode sourceNode, NullabilityNode destinationNode) {
-    expect(graph.getDownstreamNodes(sourceNode), contains(destinationNode));
+    expect(graph.getDownstreamNodes(sourceNode).toList(),
+        contains(destinationNode));
   }
 
   void assertNonNullIntent(NullabilityNode node, bool expected) {