 should = require('should')
 
 server = require('../lib/server')
+NS = require('../lib/xmpp/ns')
+
+# Useful namespaces
+NS.ATOM = "http://www.w3.org/2005/Atom"
+NS.AS   = "http://activitystrea.ms/spec/1.0/"
+NS.THR  = "http://purl.org/syndication/thread/1.0"
+
+exports.NS = NS
 
 # Fake XMPP server used to test the buddycloud server
 class exports.TestServer extends EventEmitter

                .c("value").t(value)
                .up().up()
        return el.root()

    # Prepare a disco#info stanza.
    # @return [ltx.Element] Stanza with `<query/>` as active sub-Element
    makeDiscoInfoIq: (from, to, id) ->
        return @makeIq("get", from, to, id)
            .c("query", xmlns: "http://jabber.org/protocol/disco#info")

    # Prepare a disco#items stanza.
    # @return [ltx.Element] Stanza with `<query/>` as active sub-Element
    makeDiscoItemsIq: (from, to, id) ->
        return @makeIq("get", from, to, id)
            .c("query", xmlns: "http://jabber.org/protocol/disco#items")

    # Prepare a PubSub "set" stanza.
    # @return [ltx.Element] Stanza with `<pubsub/>` as active sub-Element
    makePubsubSetIq: (from, to, id) ->
        return @makeIq("set", from, to, id)
            .c("pubsub", xmlns: "http://jabber.org/protocol/pubsub")

    # Parse an XMPP data form.
    # @param [ltx.Element] xEl data form element (`<x/>`)

                        iq = @makeIq("result", stanza.attrs.to, stanza.attrs.from, id)
                            .cnode(queryEl)
                        @emit "stanza", iq.root()
                    if stanza.getChild("query", NS.DISCO_ITEMS)? and stanza.attrs.to of @disco.items
                        items = @disco.items[stanza.attrs.to]
                        queryEl = new ltx.Element("query", xmlns: NS.DISCO_ITEMS)
                        for item in items
                            queryEl.c "item", item
                        iq = @makeIq("result", stanza.attrs.to, stanza.attrs.from, id)
