anchor.diff:          eventController.add(map);
         }
       });
  +    serverStartedEvent =
  +        events.firstWhere((map) => map['event'] == 'server.started');
   
       await _startApp();
     });
  
positive.code:       }, timeout: const Timeout.factor(10));
  
        test('server removes clients that disconnect from the API', () async {
          final event =
              await events.firstWhere((map) => map['event'] == 'server.started');
  
          // Spawn our own Chrome process so we can terminate it.
          final devToolsUri =
  
negative.code: final Map<String, Completer<Map<String, dynamic>>> completers = {};
  final StreamController<Map<String, dynamic>> eventController =
      StreamController.broadcast();
  
  /// A broadcast stream of events from the server.
  ///
  /// Listening for "server.started" events on this stream may be unreliable because
  /// it may have occurred before the test starts. Use `serverStartedEvent` instead.
  Stream<Map<String, dynamic>> get events => eventController.stream;
  Future<Map<String, dynamic>> serverStartedEvent;
  final Map<String, String> registeredServices = {};
  // A list of PIDs for Chrome instances spawned by tests that should be
  // cleaned up.
  