<test-history test='Bosh 21'>
<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><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/><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></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">cmVhbG09InRlc3QtZCIsbm9uY2U9IkwwUkdXSW41T0NFWG9qTVhTTEoxbUlDUGk5WDlGTUczMWNETGZrUEYiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription receive'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9IkwwUkdXSW41T0NFWG9qTVhTTEoxbUlDUGk5WDlGTUczMWNETGZrUEYiLG5jPTAwMDAwMDAxLGNub25jZT0idWIyelRDYUMxS3dWZXIxM1U0eGJYSE5LRjBvcFZ6ZmdtSG1IOUtTTyIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT01MTA1OTY1ODM1NDYwZjhlM2FjNTJhZTc1ZTMzOWM5Nyxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='Subscription receive'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD1lYjE3MjU1MmMyMjQ4YTI1ZTA5YjdlZGI2MjAxMGM4ZA==</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><register xmlns="http://jabber.org/features/iq-register"/><ver xmlns="urn:xmpp:features:rosterver"/><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 type="get" id="roster_1">
<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 subscription="both" jid="dynrost@test-d" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence type="available" id="1"/>
</OUTPUT>
<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><auth xmlns="http://jabber.org/features/iq-auth"/><register xmlns="http://jabber.org/features/iq-register"/><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></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">cmVhbG09InRlc3QtZCIsbm9uY2U9Ik1rVUlDVDZpSFMyaUJ3MjZRRGVSU2ZEM054dGtFcW9CTWV1aEJoRVIiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='Subscription send'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWRtaW4iLHJlYWxtPSJ0ZXN0LWQiLG5vbmNlPSJNa1VJQ1Q2aUhTMmlCdzI2UURlUlNmRDNOeHRrRXFvQk1ldWhCaEVSIixuYz0wMDAwMDAwMSxjbm9uY2U9IkJKVHJ2TUhDL0RIbDJneCtYZHZNSlZvVkN6T1duMG5jSDhHZjNDSXgiLGRpZ2VzdC11cmk9InhtcHAvdGVzdC1kIixtYXhidWY9NjU1MzYscmVzcG9uc2U9NTQwYTFlZDg1ZWM1ZTE2MjY0NWJhMDZmNzlmNmUzNDEscW9wPWF1dGgsYXV0aHppZD0iYWRtaW4i</response>
</OUTPUT>
<INPUT test='Subscription send'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD00YzFjODZhNWJkZTQwZjcxMWMwYzM1MjI4MmVmZjg4Mg==</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><register xmlns="http://jabber.org/features/iq-register"/><ver xmlns="urn:xmpp:features:rosterver"/><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 type="get" id="roster_1">
<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"><item subscription="none" jid="all-xmpp-test@test-d" 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 subscription="both" jid="dynrost@test-d" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>
<OUTPUT test='Subscription send'>
<presence type="available" id="1"/>
</OUTPUT>
<OUTPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" type="subscribe" id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d" id="rsttig1" type="set"><query xmlns="jabber:iq:roster"><item ask="subscribe" subscription="none" jid="all-xmpp-test@test-d" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence from="admin@test-d" to="all-xmpp-test@test-d" id="1" type="subscribe" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence to="admin@test-d" type="subscribed" id="1"/>
</OUTPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d" id="rsttig2" type="set"><query xmlns="jabber:iq:roster"><item subscription="from" jid="admin@test-d" name="admin"/></query></iq>
</INPUT>
<OUTPUT test='Subscription receive'>
<presence to="admin@test-d" type="subscribe" id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d" id="rsttig2" type="set"><query xmlns="jabber:iq:roster"><item subscription="to" jid="all-xmpp-test@test-d" name="all-xmpp-test"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<presence from="all-xmpp-test@test-d/def-user-resource" to="admin@test-d" id="1" type="available" xmlns="jabber:client"/>
</INPUT>
<INPUT test='Subscription receive'>
<iq to="all-xmpp-test@test-d" id="rsttig4" type="set"><query xmlns="jabber:iq:roster"><item ask="subscribe" subscription="from" jid="admin@test-d" name="admin"/></query></iq>
</INPUT>
<INPUT test='Subscription send'>
<presence from="all-xmpp-test@test-d" to="admin@test-d" id="1" type="subscribe" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription send'>
<presence to="all-xmpp-test@test-d" type="subscribed" id="1"/>
</OUTPUT>
<INPUT test='Subscription send'>
<iq to="admin@test-d" id="rsttig3" type="set"><query xmlns="jabber:iq:roster"><item subscription="both" jid="all-xmpp-test@test-d" name="all-xmpp-test"/></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 to="admin@test-d/def-user-resource" id="roster_11" type="result"><query xmlns="jabber:iq:roster"><item subscription="both" jid="all-xmpp-test@test-d" 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 subscription="both" jid="dynrost@test-d" 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 subscription="both" jid="admin@test-d" name="admin"/></query></iq>
</INPUT>
<INPUT test='Subscription receive'>
<presence from="admin@test-d/def-user-resource" to="all-xmpp-test@test-d" id="1" type="available" xmlns="jabber:client"/>
</INPUT>
<OUTPUT test='Subscription receive'>
<iq type="get" id="roster_28">
<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 subscription="both" jid="admin@test-d" 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 subscription="both" jid="dynrost@test-d" name="dynrost"><group>test group</group></item></query></iq>
</INPUT>

</test-history>