               uuid: 'imposter-uuid'
               token: 'leak'
               as: 'sender-uuid'
+            fromUuid: 'sender-uuid'
             jobType: 'SendMessage2'
           data:
             devices: ['receiver-uuid'], payload: 'boo'

  beforeEach 'create imposter device', (done) ->
    @imposterDevice =
      uuid: 'imposter-uuid'
      token: bcrypt.hashSync @auth.token, 8
      type: 'device:imposter'

    @devices.insert @imposterDevice, done

  context 'When sending a message as another device', ->
    context "sender-uuid receiving it's sent messages", ->
      @timeout 5000
      beforeEach 'create message received subscription', (done) ->
        subscription =
          type: 'message.received'
          emitterUuid: 'received-uuid'
          subscriberUuid: 'received-uuid'

        @subscriptions.insert subscription, done


JobManager     = require 'meshblu-core-job-manager'
HydrantManager = require 'meshblu-core-manager-hydrant'

describe 'SendMessage2: send-as', ->
  @timeout 5000
  beforeEach (done) ->
    @db            = mongojs 'meshblu-core-test'
    @devices       = @db.collection 'devices'
