'Unexpected disconnects get converted to ConnectionLost errors.'

def test_unexpectedEOF(self):

    (tlsClient, tlsServer, handshakeDeferred, disconnectDeferred) = self.handshakeProtocols()
    serverProtocol = tlsServer.wrappedProtocol
    data = []
    reason = []
    serverProtocol.dataReceived = data.append
    serverProtocol.connectionLost = reason.append
    def handshakeDone(ign):
        tlsClient.write('hello')
        tlsClient.transport.loseConnection()
    handshakeDeferred.addCallback(handshakeDone)
    def disconnected(ign):
        self.assertTrue(reason[0].check(ConnectionLost), reason[0])
    disconnectDeferred.addCallback(disconnected)
    return disconnectDeferred
