anchor.diff:  
     SendPort get dispatchSendPort => _dispatchPort.sendPort;
   
  -  void dispatch(var message) {
  +  dispatch(var message) async {
       TestServerCommand command = message[0];
       SendPort replyTo = message[1];
       if (command.isStart) {
         try {
  -        HttpServer.bind("127.0.0.1", 0).then((server) {
  +        var addr = (await InternetAddress.lookup("localhost"))[0];
  +        HttpServer.bind(addr, 0).then((server) {
             _server = server;
             _server.listen(_requestReceivedHandler);
             replyTo.send(new TestServerStatus.started(_server.port));
  
positive.code:   TestServerMain testServerMain = new TestServerMain();
    testServerMain.setServerStartedHandler((int port) {
      var request = SyncHttpClient
          .getUrl(new Uri.http("127.0.0.1:$port", "/thisisnotfound"));
      var response = request.close();
      expect(HttpStatus.NOT_FOUND, equals(response.statusCode));
      expect("Page not found", equals(response.body));
  
negative.code:   TestServerMain testServerMain = new TestServerMain();
    testServerMain.setServerStartedHandler((int port) {
      var request =
          SyncHttpClient.getUrl(new Uri.http("localhost:$port", "/0123456789"));
      var response = request.close();
      expect(HttpStatus.OK, equals(response.statusCode));
      expect(11, equals(response.contentLength));
  