'Verify that starting TLS and failing by way of a lost connection
notices that it is probably an SSL problem.'

def test_negotiationFailedByClosing(self):

    (cli, svr, p) = connectedServerAndClient(ServerClass=SecurableProto, ClientClass=SecurableProto)
    droppyCert = DroppyCert(svr.transport)
    svr.certFactory = (lambda : droppyCert)
    cli.callRemote(amp.StartTLS, tls_localCertificate=droppyCert)
    p.flush()
    self.assertEqual(droppyCert.verifyCount, 2)
    d = cli.callRemote(SecuredPing)
    p.flush()
    self.assertFailure(d, error.PeerVerifyError)
