 
         @authDevice = sinon.stub().yields new Error
 
-        @sut = new MeshbluSocketIOHandler authDevice: @authDevice
+        @sut = new MeshbluSocketIOHandler authDevice: @authDevice, meshbluEventEmitter: @meshbluEventEmitter
         @sut.initialize @socket
         @sut = sinon.spy()
 

        @socket = new EventEmitter

        @authDevice = sinon.stub().yields new Error 'not authorized'
        @sut = new MeshbluSocketIOHandler authDevice: @authDevice
        @sut.initialize @socket
        @socket.emit 'identity', {uuid: 'something', token: 'something-else'}, (@result) =>


        @socket = new EventEmitter

        @authDevice = sinon.stub().yields null, {uuid: 'device'}
        @sut = new MeshbluSocketIOHandler authDevice: @authDevice, meshbluEventEmitter: @meshbluEventEmitter
        @sut.initialize @socket
        @callback = sinon.spy()
        @socket.emit 'identity', uuid: 'device', token: 'wrong', @callback
