       payload = { foo: 'bar99' }
       inQueue = 'inqueue232'
       outQueue = 'outqueue353'
-      onReceive = (msg) ->
-        receiver.ackMessage msg
-        chai.expect(msg).to.include.keys 'data'
-        chai.expect(msg.data).to.eql payload
-        done()
-      createConnectClients ['sender', 'receiver'], (err) ->
-        clients.receiver.createQueue 'inqueue', inQueue, (err) ->
-          chai.expect(err).to.be.a 'null'
-          clients.sender.createQueue 'outqueue', outQueue, (err) ->
-            chai.expect(err).to.be.a 'null'
+      createConnectClients address, ['sender', 'receiver'], (err, clients) ->
+        createQueues [
+          [ clients.receiver, 'inqueue', inQueue ]
+          [ clients.sender, 'outqueue', outQueue ]
+        ], (err) ->
+          chai.expect(err).to.not.exist
+
+          onReceive = (msg) ->
+            clients.receiver.ackMessage msg
+            chai.expect(msg).to.include.keys 'data'
+            chai.expect(msg.data).to.eql payload
+            done()
 
           broker.addBinding {type:'pubsub', src:outQueue, tgt:inQueue}, (err) ->
             chai.expect(err).to.be.a 'null'

      ret[nc[0]] = nc[1]
    return callback null, ret

createBindQueues = (broker, queueMapping, callback) ->
  createBindQueue = (det, cb) ->
    [client, type, srcQ, tgtQ] = det
    createQ = if type == 'outqueue' then srcQ else tgtQ
    client.createQueue type, createQ, (err) ->
      return cb err if err
      broker.addBinding {type:'pubsub', src:srcQ, tgt:tgtQ}, cb

  async.map queueMapping, createBindQueue, callback



        inQueue = 'inqueue27'

        createQueues [ [ clients.receive, 'inqueue', inQueue] ], (err) ->
          chai.expect(err).to.not.exist
          clients.receive.subscribeToQueue inQueue, onReceive, (err) ->
            chai.expect(err).to.not.exist
