   generateRandomString } = require '../../index'
 
 crypto       = require 'crypto'
-JProvisioner = require '../../../../social/lib/social/models/computeproviders/provisioner'
+JProvisioner = require \
+  '../../../../social/lib/social/models/computeproviders/provisioner'
 
 
 generateProvisionerData = (data = {}) ->

    options.originId = account?.getId() ? new ObjectId
    options.group    = client?.context?.group

    createProvisioner options, (err, provisioner) ->
      expect(err).to.not.exist
      data.provisioner = provisioner
      return callback data


module.exports = {
  generateProvisionerData
  withConvertedUserAndProvisioner
}

  return provisionerData


createProvisioner = (client, options, callback) ->

  provisionerData = generateProvisionerData options

  JProvisioner.create client, provisionerData, (err, provisioner) ->
    callback err, { provisioner }


withConvertedUserAndProvisioner = (options, callback) ->
