 
 
         it 'returns true', () ->
-          listenerCallback = sinon.spy()
-          testMessage = {}
-
-          testListener = @createListener listenerCallback
+          testMessage = {}
+
+          testListener = @createListener ->
           result = testListener.call testMessage
           expect(result).to.be.ok
 
         it 'calls the provided callback with true', (done) ->
-          listenerCallback = sinon.spy()
-          testMessage = {}
-
-          testListener = @createListener listenerCallback
+          testMessage = {}
+
+          testListener = @createListener ->
           testListener.call testMessage, (result) ->
             expect(result).to.be.ok
             done()
 
         it 'calls the provided callback after the function returns', (done) ->
-          listenerCallback = sinon.spy()
-          testMessage = {}
-
-          testListener = @createListener listenerCallback
+          testMessage = {}
+
+          testListener = @createListener ->
           finished = false
           testListener.call testMessage, (result) ->
             expect(finished).to.be.ok

          testListener.call testMessage, sinon.spy()

        it 'passes through the provided middleware stack', (testDone) ->
          listenerCallback = sinon.spy()
          testMessage = {}

          testListener = @createListener listenerCallback
          testMiddleware =
            execute: (context, next, done) ->
              expect(context.listener).to.be.equal(testListener)

          finished = true

        it 'does not execute any middleware', (done) ->
          testMessage = {}

          testListener = @createListener ->
          testMiddleware =
            execute: sinon.spy()

