anchor.diff:        expect(result == 'true');
         request.close().then((result) { });
       }, onError: (e) {
  -      if (result == 'false') expect (e is HandshakeException);
  -      else if (result == 'exception') expect (e is ExpectException);
  -      else expect (e is ArgumentError);
  +      if (result == 'false') expect (e is HandshakeException ||
  +                                     e is SocketException);
  +      else if (result == 'exception') expect (e is ExpectException ||
  +                                              e is SocketException);
  +      else expect (e is ArgumentError || e is SocketException);
       }));
   
     client.badCertificateCallback = null;
  
positive.code:     .then((HttpClientRequest request) {
        expect(false);
      }, onError: (e) {
        expect(e is HandshakeException);
      }));
  
    return Future.wait(testFutures);
  
negative.code: 
    var testFutures = [];
    testFutures.add(client.getUrl(Uri.parse('https://$HOST_NAME:$port/$result'))
      .then((HttpClientRequest request) {
        expect(false);
      }, onError: (e) {
        expect(e is HandshakeException || e is SocketException);
      }));
  
    client.badCertificateCallback = badCertificateCallback;
    testFutures.add( client.getUrl(Uri.parse('https://$HOST_NAME:$port/$result'))
  