<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 xmlns="jabber:client" id="bdefd205-1c3b-4af3-941e-2bf4954f248e" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><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><register xmlns="http://jabber.org/features/iq-register"/><auth xmlns="http://jabber.org/features/iq-auth"/></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">cmVhbG09InRlc3QtZCIsbm9uY2U9InFsdUhEcUk5UXp1dkRHV04rRVBTMGN6VnlvUTJxS29rdmdCWVVnNFQiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription receive'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9InFsdUhEcUk5UXp1dkRHV04rRVBTMGN6VnlvUTJxS29rdmdCWVVnNFQiLG5jPTAwMDAwMDAxLGNub25jZT0iUmkxT3dCNVRnN2w4WVRJQzFNb1Qvejc0N2krUzcyMXM0UDA2d3ZCayIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT1jN2E4MzE1NjE3YjExOWMwMWQyNTMyOWYwZGEyNTdhMixxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD1jZmMwMjdhYTMyMDNmMDUwMGZmNjA3ZGFkMGNjOGViMA==</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 xmlns="jabber:client" id="bdefd205-1c3b-4af3-941e-2bf4954f248e" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription receive'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><register xmlns="http://jabber.org/features/iq-register"/><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 type="result" to="all-xmpp-test@test-d/def-user-resource" id="bind1"><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 type="get" id="roster_1">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="result" to="all-xmpp-test@test-d/def-user-resource" id="roster_1"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" to="all-xmpp-test@test-d/def-user-resource" id="dr-1"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence type="available" 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 xmlns="jabber:client" id="a19753f1-52be-428f-9169-ad00f4ac49db" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><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><register xmlns="http://jabber.org/features/iq-register"/><auth xmlns="http://jabber.org/features/iq-auth"/></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">cmVhbG09InRlc3QtZCIsbm9uY2U9Ikg3YjAramh2dmp2UDlyanpjbjJScUdUS2JJNW9IdmJlaURvZGh5OSsiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription send'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWRtaW4iLHJlYWxtPSJ0ZXN0LWQiLG5vbmNlPSJIN2IwK2podnZqdlA5cmp6Y24yUnFHVEtiSTVvSHZiZWlEb2RoeTkrIixuYz0wMDAwMDAwMSxjbm9uY2U9InV3eWd5Z3dlOCtpKytEd0NOdVQvOC80MWwyRS9FcjdFRkw1bmNDSVQiLGRpZ2VzdC11cmk9InhtcHAvdGVzdC1kIixtYXhidWY9NjU1MzYscmVzcG9uc2U9MmM5NzFlZTMwZDNhMTllNDU4MjczYzQxODkxYTkxZWIscW9wPWF1dGgsYXV0aHppZD0iYWRtaW4i</response>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD0xMWE0OWVlODBlY2Y4NzFkNmVjZWI3NzRkNWM4MmQ2NQ==</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 xmlns="jabber:client" id="a19753f1-52be-428f-9169-ad00f4ac49db" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='Subscription send'>
<stream:features><ver xmlns="urn:xmpp:features:rosterver"/><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/><register xmlns="http://jabber.org/features/iq-register"/><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 type="result" to="admin@test-d/def-user-resource" id="bind1"><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 type="get" id="roster_1">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="result" to="admin@test-d/def-user-resource" id="roster_1"><query xmlns="jabber:iq:roster"/></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq type="set" to="admin@test-d/def-user-resource" id="dr-1"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence type="available" id="1"/>
</OUTPUT>
<OUTPUT test='Subscription send'>
<presence type="subscribe" to="all-xmpp-test@test-d" id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="set" to="admin@test-d/def-user-resource" id="rsttig1"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" ask="subscribe" name="all-xmpp-test" subscription="none"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence type="subscribe" to="all-xmpp-test@test-d" id="1" from="admin@test-d"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence type="subscribed" to="admin@test-d" id="1"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="set" to="all-xmpp-test@test-d/def-user-resource" id="rsttig1"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" name="admin" subscription="from"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence type="subscribe" to="admin@test-d" id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="set" to="admin@test-d/def-user-resource" id="rsttig2"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" name="all-xmpp-test" subscription="to"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<presence type="available" to="admin@test-d" id="1" from="all-xmpp-test@test-d/def-user-resource"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" to="all-xmpp-test@test-d/def-user-resource" id="rsttig2"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" ask="subscribe" name="admin" subscription="from"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<presence type="subscribe" to="admin@test-d" id="1" from="all-xmpp-test@test-d"/>
</INPUT>
<OUTPUT test='Subscription send'>
<presence type="subscribed" to="all-xmpp-test@test-d" id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="set" to="admin@test-d/def-user-resource" id="rsttig3"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" name="all-xmpp-test" subscription="both"/></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="get" id="roster_11">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="result" to="admin@test-d/def-user-resource" id="roster_11"><query xmlns="jabber:iq:roster"><item jid="all-xmpp-test@test-d" name="all-xmpp-test" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq type="set" to="admin@test-d/def-user-resource" id="dr-1"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" to="all-xmpp-test@test-d/def-user-resource" id="rsttig3"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" name="admin" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence type="available" to="all-xmpp-test@test-d" id="1" from="admin@test-d/def-user-resource"/>
</INPUT>
<INPUT test='Subscription receive'>
<presence type="unavailable" to="all-xmpp-test@test-d" id="1" from="admin@test-d/def-user-resource"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="get" id="roster_28">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="result" to="all-xmpp-test@test-d/def-user-resource" id="roster_28"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" name="admin" subscription="both"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="set" to="all-xmpp-test@test-d/def-user-resource" id="dr-1"><query xmlns="jabber:iq:roster"><item jid="dynrost@test-d" name="dynrost" subscription="both"><group>test group</group></item></query></iq>
</INPUT>

</test-history>