'Asserts that the client broker\'s transport was closed and then
mimics the event loop by calling the broker\'s connectionLost
callback with C{reason}, followed by C{self.clientFactory}\'s
C{clientConnectionLost}
@param reason: (optional) the reason to pass to the client
broker\'s connectionLost callback
@type reason: L{Failure}'

def completeClientLostConnection(self, reason=failure.Failure(main.CONNECTION_DONE)):

    self.assertTrue(self.client.transport.closed)
    self.client.connectionLost(reason)
    self.clientFactory.clientConnectionLost(self.connector, reason)
