'When L{TLSMemoryBIOProtocol} is connected to a transport, it connects
the protocol it wraps to a transport.'

def test_makeConnection(self):

    clientProtocol = Protocol()
    clientFactory = ClientFactory()
    clientFactory.protocol = (lambda : clientProtocol)
    contextFactory = ClientTLSContext()
    wrapperFactory = TLSMemoryBIOFactory(contextFactory, True, clientFactory)
    sslProtocol = wrapperFactory.buildProtocol(None)
    transport = StringTransport()
    sslProtocol.makeConnection(transport)
    self.assertIsNotNone(clientProtocol.transport)
    self.assertIsNot(clientProtocol.transport, transport)
    self.assertIs(clientProtocol.transport, sslProtocol)
