<test-history test='Bosh keep-alive 23'>
<OUTPUT test='Subscription receive'>
<body xmlns='http://jabber.org/protocol/httpbind' xmlns:xmpp='urn:xmpp:xbosh' xml:lang='en' rid='1216' content='text/xml; charset=utf-8' to='test-d' ver='1.6'/>
</OUTPUT>
<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">cmVhbG09InRlc3QtZCIsbm9uY2U9ImR6QkQydkJWTVBFR3k5V09ocEJyWDg3YURwajk4dFlzbVU2VkROWkQiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription receive'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9ImR6QkQydkJWTVBFR3k5V09ocEJyWDg3YURwajk4dFlzbVU2VkROWkQiLG5jPTAwMDAwMDAxLGNub25jZT0idHhnYU5UZXNNT3ZJN3ZMNmtvbUhzaGp4R3g5UHV4QXRMcWNFTzhUQiIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT1kMmI4ZjA3NWE5ZTE3N2U3ODU1NDI5MDM3MDY4YTdlOCxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD0xZTA5NzI4MjRkOTJjN2U1ZTQ4OWQzYzQ2MWYxY2U5Mg==</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: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_44">
<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_44"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" name="admin" subscription="from"/></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>
<OUTPUT test='Subscription send'>
<body xmlns='http://jabber.org/protocol/httpbind' xmlns:xmpp='urn:xmpp:xbosh' xml:lang='en' rid='1216' content='text/xml; charset=utf-8' to='test-d' ver='1.6'/>
</OUTPUT>
<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">cmVhbG09InRlc3QtZCIsbm9uY2U9InRUcVkycXczMzJvTDEwaHhPRFFtTTRGbTdpdzBLL3BHOFhibzhVWksiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription send'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWRtaW4iLHJlYWxtPSJ0ZXN0LWQiLG5vbmNlPSJ0VHFZMnF3MzMyb0wxMGh4T0RRbU00Rm03aXcwSy9wRzhYYm84VVpLIixuYz0wMDAwMDAwMSxjbm9uY2U9Imd0NHhyYVRkWnI4WWlhSS9Ybm5oNjBrVW1mMGhwN1pOc0N6R25KVVEiLGRpZ2VzdC11cmk9InhtcHAvdGVzdC1kIixtYXhidWY9NjU1MzYscmVzcG9uc2U9ODkyYjAwNGVkYWU0YjUxMjQwMTFkOWM0MTM4NWExODYscW9wPWF1dGgsYXV0aHppZD0iYWRtaW4i</response>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD03YzM4NDExMWYyMzcxNzY5YmFlYWQ1NzAyYjM4MTJiNQ==</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: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_33">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="result" to="admin@test-d/def-user-resource" id="roster_33"><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'>
<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="unsubscribe" 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" name="all-xmpp-test" subscription="none"/></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="set" id="roster-remove-123">
<query xmlns="jabber:iq:roster">
<item jid="all-xmpp-test@test-d" subscription="remove"/></query>
</iq>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq type="set" to="all-xmpp-test@test-d/def-user-resource" id="rsttig4"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" name="admin" subscription="none"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="set" id="roster-remove-321">
<query xmlns="jabber:iq:roster">
<item jid="admin@test-d" subscription="remove"/></query>
</iq>
</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" subscription="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<iq type="result" to="admin@test-d/def-user-resource" id="roster-remove-123"/>
</INPUT>
<OUTPUT test='Subscription send'>
<iq type="get" id="roster_777">
<query xmlns="jabber:iq:roster"/></iq>
</OUTPUT>
<INPUT test='Subscription send'>
<iq type="result" to="admin@test-d/def-user-resource" id="roster_777"><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>
<INPUT test='Subscription receive'>
<iq type="set" to="all-xmpp-test@test-d/def-user-resource" id="rsttig8"><query xmlns="jabber:iq:roster"><item jid="admin@test-d" subscription="remove"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<iq type="result" to="all-xmpp-test@test-d/def-user-resource" id="roster-remove-321"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="get" id="roster_888">
<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_888"><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>

</test-history>