'Test start when TLS is wanted and the SSL library available.'

def testWantedSupported(self):

    self.xmlstream.transport = proto_helpers.StringTransport()
    self.xmlstream.transport.startTLS = (lambda ctx: self.done.append('TLS'))
    self.xmlstream.reset = (lambda : self.done.append('reset'))
    self.xmlstream.sendHeader = (lambda : self.done.append('header'))
    d = self.init.start()
    d.addCallback(self.assertEqual, xmlstream.Reset)
    starttls = self.output[0]
    self.assertEqual('starttls', starttls.name)
    self.assertEqual(NS_XMPP_TLS, starttls.uri)
    self.xmlstream.dataReceived(("<proceed    xmlns='%s'/>" % NS_XMPP_TLS))
    self.assertEqual(['TLS', 'reset', 'header'], self.done)
    return d
