<test-history test='Test 30'>
<OUTPUT test='Subscription receive'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'/>
</OUTPUT>
<INPUT test='Subscription receive'>
<stream:stream xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" id="e508ca8a-1405-4947-aaeb-556c188984ed" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<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='Subscription receive'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
</OUTPUT>
<INPUT test='Subscription receive'>
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InRlc3QtZCIsbm9uY2U9ImMvcDQ3aGFjL0RpWm9ZUzk0R1o3Ty80UVhIVE5JN08vMzhBU2wrTTkiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription receive'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9ImMvcDQ3aGFjL0RpWm9ZUzk0R1o3Ty80UVhIVE5JN08vMzhBU2wrTTkiLG5jPTAwMDAwMDAxLGNub25jZT0iVUozYi8vc25DZmlXa3RkaXBzaWhKd1crSmxaOXRHNWFZZVJKZUpoZiIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT03YjAxNDIwZTBmZTNhOTQwNDczMjU5NDUwN2FkMjQ3OCxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD00NGQzMDcwODU3YWRiMGY2MmQyYmI5ZGQ4NzhlMmEyNQ==</success>
</INPUT>
<OUTPUT test='Subscription receive'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'>
</OUTPUT>
<INPUT test='Subscription receive'>
<stream:stream xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" id="e508ca8a-1405-4947-aaeb-556c188984ed" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<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='Subscription receive'>
<iq type='set' id='bind1'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>res-1</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/res-1" id="bind1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/res-1</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence id="1"/>
</OUTPUT>
<OUTPUT test='Subscription send'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'/>
</OUTPUT>
<INPUT test='Subscription send'>
<stream:stream xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" id="f9f79727-664d-4a22-bfd6-2c11c1b5791a" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription send'>
<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='Subscription send'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
</OUTPUT>
<INPUT test='Subscription send'>
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InRlc3QtZCIsbm9uY2U9IlJ2ZGlDWnlLVElkSXM0SlN1K0RBSERLY3ZjcVY1QXdYck9CbjJzN0oiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription send'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9IlJ2ZGlDWnlLVElkSXM0SlN1K0RBSERLY3ZjcVY1QXdYck9CbjJzN0oiLG5jPTAwMDAwMDAxLGNub25jZT0iNDdxQktTTlNLTzc3Z0k0SS9TSDhrR0JMcDFrMEpOaGZ0d2RvZUJzRSIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT02ZDc0Yjk0NzA4NzNhOTc4ZDk1NThjOGYyMWU4NTNiNSxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD04OGRiMTQwODNkNjllY2M2ZTdjMmUwOTE3YzZmMmJkZQ==</success>
</INPUT>
<OUTPUT test='Subscription send'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'>
</OUTPUT>
<INPUT test='Subscription send'>
<stream:stream xml:lang="en" xmlns:stream="http://etherx.jabber.org/streams" version="1.0" from="test-d" id="f9f79727-664d-4a22-bfd6-2c11c1b5791a" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription send'>
<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='Subscription send'>
<iq type='set' id='bind1'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>res-2</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="all-xmpp-test@test-d/res-2" id="bind1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>all-xmpp-test@test-d/res-2</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/res-1" id="1"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" from="all-xmpp-test@test-d/res-2" id="1"/>
</INPUT>

</test-history>