 
       withConvertedUser options, ({ client, account }) ->
 
-        data = { group, accountId : account.getId() }
+        data = { group, account }
         JApiToken.create data, (err, token) ->
           expect(err).to.not.exist
           expect(token.code).to.be.a 'string'

      queue = []

      invalidData = [
        { accountId : ''                    , group : '' }
        { accountId : generateRandomString(), group : '' }
        { accountId : ''                    , group : generateRandomString() }
      ]

      invalidData.forEach (data) ->
        queue.push ->
          JApiToken.create data, (err, token) ->
            expect(err?.message).to.be.equal 'accountId and group must be set!'
            expect(token).to.not.exist
            queue.next()


      group = generateRandomString()
      options   = { context : { group }, createGroup : yes }

      withConvertedUser options, ({ client, account }) ->

        queue = [

          ->
            data = { group, account : {} }
            JApiToken.create data, (err, token) ->
              expect(err?.message).to.be.equal 'account is not an instance of Jaccount!'
              expect(token).to.not.exist
              queue.next()

          ->
            data = { group : generateRandomString(), account }
            JApiToken.create data, (err, token) ->
              expect(err?.message).to.be.equal 'group not found!'
              expect(token).to.not.exist
