<test-history test='Test 22'>
<OUTPUT test='Test 22'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'/>
</OUTPUT>
<INPUT test='Test 22'>
<stream:stream xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" id="ae9d48a0-c1fe-4730-bee8-d51c199b3448" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Test 22'>
<stream:features><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>CRAM-MD5</mechanism><mechanism>ANONYMOUS</mechanism></mechanisms></stream:features>
</INPUT>
<OUTPUT test='Test 22'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
</OUTPUT>
<INPUT test='Test 22'>
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InRlc3QtZCIsbm9uY2U9IkIyMFhvRkN1OTl0alhTQTJ3anVERG9MSFFKU2xOOUt0SXhkM3JHTHMiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Test 22'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9IkIyMFhvRkN1OTl0alhTQTJ3anVERG9MSFFKU2xOOUt0SXhkM3JHTHMiLG5jPTAwMDAwMDAxLGNub25jZT0iV3ZXTUptWS8zaXJmN2Jyc3RtOGY5Z3NkM1FNcTNzbjl3Vnhmb1h2NiIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT0wZjk2YzZjN2RjZGQ5YzQwOTczZTJiZWY1ODk2YzcxNSxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Test 22'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD0xNmJjMzU3NGJkZWViY2MyNWFiMjBkM2U4NzFhOTY3Mw==</success>
</INPUT>
<OUTPUT test='Test 22'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'>
</OUTPUT>
<INPUT test='Test 22'>
<stream:stream xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" id="ae9d48a0-c1fe-4730-bee8-d51c199b3448" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Test 22'>
<stream:features><register xmlns="http://jabber.org/features/iq-register"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/></stream:features>
</INPUT>
<OUTPUT test='Test 22'>
<iq type='set' id='bind1'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>def-user-resource</resource></bind></iq>
</OUTPUT>
<INPUT test='Test 22'>
<iq id="bind1" to="all-xmpp-test@test-d/def-user-resource" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/def-user-resource</jid></bind></iq>
</INPUT>
<OUTPUT test='Test 22'>
<iq id="ping123" to="test-d" type="get">
<ping xmlns="urn:xmpp:ping"/></iq>
</OUTPUT>
<INPUT test='Test 22'>
<iq from="test-d" to="all-xmpp-test@test-d/def-user-resource" type="result" id="ping123"/>
</INPUT>

</test-history>