anchor.diff:        if (d == null) Expect.fail("Invalid data");
         sendData(d, server.port)
            .then((_) {
  -            if (!expectRequest) server.close();
  +            if (!expectRequest) requestCompleter.complete();
  +            requestCompleter.future.then((_) => server.close());
             });
   
         return c.future;
  
positive.code:         Expect.fail("No data response was expected");
        });
      socket.add(data);
      socket.done.then((_) {
        socket.destroy();
      });
      return socket.close();
    });
  }
  
  
negative.code:       bool calledOnError = false;
        bool calledOnDone = false;
        ReceivePort port = new ReceivePort();
        var requestCompleter = new Completer();
        server.listen(
            (request) {
              Expect.isTrue(expectRequest);
  