<test-history test='Test 25'>
<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="06745dcf-3452-4a57-8c0d-b74c15375680" 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">cmVhbG09InRlc3QtZCIsbm9uY2U9ImtYa2hyUmFxZ3BXcWRuL0tjNm9CNFEyRTJma3I2dXh3OFZmMTUrdTgiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription receive'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9ImtYa2hyUmFxZ3BXcWRuL0tjNm9CNFEyRTJma3I2dXh3OFZmMTUrdTgiLG5jPTAwMDAwMDAxLGNub25jZT0ieXJtT2JXWjkrNlJyYmxLNldndkJmZ1N0Q0ViMmFrQklFR3FhMlQ1UiIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT1kZTk3NTczOTc1ZjliNmU0ZmQyMmNmODBhMTk0ZDU5ZCxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD1jZGJhOThmMmNmMWJmMzgzZWVkYWE1OWZmYjI2MDI4Ng==</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="06745dcf-3452-4a57-8c0d-b74c15375680" 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>def-user-resource</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="bind1" 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='Subscription receive'>
<iq id="roster_1" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="roster_1" type="result"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="dr-1" type="set"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" subscription="both" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence id="1" type="available"/>
</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="e4bf3784-221c-4e07-b8cb-d7236992e040" 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">cmVhbG09InRlc3QtZCIsbm9uY2U9IjNxNnBLR2hjQk1tMkJEanlNM0JnT3dwKzd5a2ZiUlV2N2h1Y1VDVTciLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription send'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWRtaW4iLHJlYWxtPSJ0ZXN0LWQiLG5vbmNlPSIzcTZwS0doY0JNbTJCRGp5TTNCZ093cCs3eWtmYlJVdjdodWNVQ1U3IixuYz0wMDAwMDAwMSxjbm9uY2U9IkxqcHYrTmJRUWd6Nm91R09raHM5Z01sYnNVeUZRcmhtc1VJTEd4YzkiLGRpZ2VzdC11cmk9InhtcHAvdGVzdC1kIixtYXhidWY9NjU1MzYscmVzcG9uc2U9OTM5NTc2Nzg2Y2M4YmU2YmM1NTg1Yzk5ODIyNmQwNjEscW9wPWF1dGgsYXV0aHppZD0iYWRtaW4i</response>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD0yMWJiNWU1Yzg5OTFjNWE4MWRhZjY4OGEwNWVmZDliNg==</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="e4bf3784-221c-4e07-b8cb-d7236992e040" 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>def-user-resource</resource></bind></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="bind1" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>admin@test-d/def-user-resource</jid></bind></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="roster_1" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="roster_1" type="result"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="dr-1" type="set"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" subscription="both" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence id="1" type="available"/>
</OUTPUT>
<OUTPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" id="1" type="subscribe"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d" id="rsttig1" type="set"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" ask="subscribe" subscription="none" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" from="admin@test-d" id="1" type="subscribe"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence to="admin@test-d" id="1" type="subscribed"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d" id="rsttig1" type="set"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" subscription="from" name="admin"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence to="admin@test-d" id="1" type="subscribe"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d" id="rsttig2" type="set"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" subscription="to" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" from="all-xmpp-test@test-d/def-user-resource" id="1" type="available" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d" id="rsttig2" type="set"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" ask="subscribe" subscription="from" name="admin"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<presence to="admin@test-d" from="all-xmpp-test@test-d" id="1" type="subscribe"/>
</INPUT>
<OUTPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" id="1" type="subscribed"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d" id="rsttig3" type="set"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" subscription="both" name="all-xmpp-test"/></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="roster_11" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="roster_11" type="result"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" subscription="both" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="dr-1" type="set"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" subscription="both" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d" id="rsttig3" type="set"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" subscription="both" name="admin"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" from="admin@test-d/def-user-resource" id="1" type="available" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence to="all-xmpp-test@test-d" from="admin@test-d/def-user-resource" id="1" type="unavailable" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="roster_28" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="roster_28" type="result"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" subscription="both" name="admin"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="dr-1" type="set"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" subscription="both" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>

</test-history>