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

  return provisionerData


createProvisioner = (data, callback) ->

  provisioner = new JProvisioner generateProvisionerData data
  provisioner.save (err) ->
    return callback err, provisioner


withConvertedUserAndProvisioner = (options, callback) ->

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

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


module.exports = {
  createProvisioner
  generateProvisionerData
  withConvertedUserAndProvisioner
}
