<test-history test='PubSub 3'>
<OUTPUT test='PubSub 3'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'/>
</OUTPUT>
<INPUT test='PubSub 3'>
<stream:stream xmlns="jabber:client" id="4f9d8c97-1e66-4bb5-8042-4147aa68f777" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='PubSub 3'>
<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='PubSub 3'>
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
</OUTPUT>
<INPUT test='PubSub 3'>
<challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09InRlc3QtZCIsbm9uY2U9IjQxNzh5NVNCOFB2TUdqdHRmZTVZc3ZBVmI4WTF6MkMrN0hvdVIrZXQiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
</INPUT>
<OUTPUT test='PubSub 3'>
<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iYWxsLXhtcHAtdGVzdCIscmVhbG09InRlc3QtZCIsbm9uY2U9IjQxNzh5NVNCOFB2TUdqdHRmZTVZc3ZBVmI4WTF6MkMrN0hvdVIrZXQiLG5jPTAwMDAwMDAxLGNub25jZT0iaXRUOVFIUnVvRTZQakdtWlFDVENMdmlNRXNjTytNYlRrdElVbmF5eSIsZGlnZXN0LXVyaT0ieG1wcC90ZXN0LWQiLG1heGJ1Zj02NTUzNixyZXNwb25zZT00MGE5NDE4MTQxNTA4ZmI1NDY3YzZmODQ0MmNmZDFlNSxxb3A9YXV0aCxhdXRoemlkPSJhbGwteG1wcC10ZXN0Ig==</response>
</OUTPUT>
<INPUT test='PubSub 3'>
<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD1hNjQ5MWFjNjlkZjc4ZDM2OWU4N2NlZTkwYmRkNTYzOA==</success>
</INPUT>
<OUTPUT test='PubSub 3'>
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' to='test-d' version='1.0'>
</OUTPUT>
<INPUT test='PubSub 3'>
<stream:stream xmlns="jabber:client" id="4f9d8c97-1e66-4bb5-8042-4147aa68f777" xml:lang="en" from="test-d" version="1.0" xmlns:stream="http://etherx.jabber.org/streams"/>
</INPUT>
<INPUT test='PubSub 3'>
<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='PubSub 3'>
<iq type='set' id='bind1'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>def-user-resource</resource></bind></iq>
</OUTPUT>
<INPUT test='PubSub 3'>
<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='PubSub 3'>
<iq type="set" to="pubsub.test-d" id="subs1" from="all-xmpp-test@test-d/def-user-resource">
<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
<subscriptions node="princely_musings">
<subscription jid="bard@shakespeare.lit" subscription="subscribed"/></subscriptions>
</pubsub>
</iq>
</OUTPUT>
<INPUT test='PubSub 3'>
<iq type="result" to="all-xmpp-test@test-d/def-user-resource" id="subs1" from="pubsub.test-d"/>
</INPUT>
<OUTPUT test='PubSub 3'>
<iq type="get" to="pubsub.test-d" id="subs2" from="all-xmpp-test@test-d/def-user-resource">
<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
<subscriptions node="princely_musings"/></pubsub>
</iq>
</OUTPUT>
<INPUT test='PubSub 3'>
<iq type="result" to="all-xmpp-test@test-d/def-user-resource" id="subs2" from="pubsub.test-d"><pubsub xmlns="http://jabber.org/protocol/pubsub#owner"><subscriptions node="princely_musings"><subscription jid="bard@shakespeare.lit" subscription="subscribed"/><subscription jid="all-xmpp-test@test-d" subscription="subscribed"/></subscriptions></pubsub></iq>
</INPUT>

</test-history>