<test-history test='Test 27'>
<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="4fc07ce5-4677-4d3d-8eb1-c870e2f98546" 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">cmVhbG09InRlc3QtZCIsbm9uY2U9IllHYWtwYk9wRmtHVFl3eU5QeEZveHFaczllWG8rUXFJR1NOUGE5aFYiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription receive'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9IllHYWtwYk9wRmtHVFl3eU5QeEZveHFaczllWG8rUXFJR1NOUGE5aFYiLG5jPTAwMDAwMDAxLGNub25jZT0icU14aTdVbFU0ZnpQUWxBeVBtU29YRGxtRWxNU0ZUdksvd2YxK1V5TyIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT1mZGUzOTkyM2I1NzkzNjI2MjYyNmJmMmM2YTBhY2IyNCxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD05M2I0NjgyNWVmZDViZjhkMzE5YWM4ZjA0MWY0YjBmOA==</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="4fc07ce5-4677-4d3d-8eb1-c870e2f98546" 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_44" 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_44" type="result"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" subscription="from" 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>
<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="19ac11b4-6690-4ec6-8111-a775a8f284f7" 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">cmVhbG09InRlc3QtZCIsbm9uY2U9IjJ3Qlp3NEJIdUxmR09oZEtrUHZTT2VldFdQTkZCVXQvSHB3TTl3TXgiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription send'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWRtaW4iLHJlYWxtPSJ0ZXN0LWQiLG5vbmNlPSIyd0JadzRCSHVMZkdPaGRLa1B2U09lZXRXUE5GQlV0L0hwd005d014IixuYz0wMDAwMDAwMSxjbm9uY2U9IkQzZnpzN1FsNEkxUStlaExzYTFCaktuWFFpcTl5QzZDbTAxcWQ4OVMiLGRpZ2VzdC11cmk9InhtcHAvdGVzdC1kIixtYXhidWY9NjU1MzYscmVzcG9uc2U9MDhkYTIxYTgyYTUyMDljYTJkZWZlOTJhOGVjZDJkNTEscW9wPWF1dGgsYXV0aHppZD0iYWRtaW4i</response>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD0yN2Q0ZjhkZDI5YzRiMDMzNGQ3ZmQ1ZGZjYTM4YmU0MA==</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="19ac11b4-6690-4ec6-8111-a775a8f284f7" 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_33" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="roster_33" type="result"><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'>
<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 to="all-xmpp-test@test-d" id="1" type="unsubscribe"/>
</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" subscription="none" name="all-xmpp-test"/></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="roster-remove-123" type="set">
<query xmlns="jabber:iq:roster">
<item jid="all-xmpp-test@test-d" subscription="remove"/></query>
</iq>
</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="none" name="admin"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="roster-remove-321" type="set">
<query xmlns="jabber:iq:roster">
<item jid="admin@test-d" subscription="remove"/></query>
</iq>
</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="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="roster-remove-123" type="result"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq id="roster_777" type="get">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d/def-user-resource" id="roster_777" 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>
<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" subscription="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d/def-user-resource" id="roster-remove-321" type="result"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq id="roster_888" 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_888" 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>

</test-history>