code: function prepareFiles() {
              var buckets = this.prepareBuckets();
  
              var files = [];
  
              // on travis we split up integration tests into three buckets,
              // and set which bucket will be used through environment variable
              switch (process.env.INTEGRATION_TESTS_BUCKET) {
                  case '1':
                  case '2':
                  case '3':
                      files = buckets[Number(process.env.INTEGRATION_TESTS_BUCKET) - 1];
                      break;
                  default:
                      files = buckets.reduce(function (memo, bucket) {
                          return memo.concat(bucket);
                      }, []);
              }
  
              var pre = [{
                  file: options.pathToTests + '/integration/setup.js'
              }];
  
              var fileNames;
  
              if (argv && argv.tests) {
                  fileNames = argv.tests.split(',');
                  logger('Running tests for ' + fileNames.join(', '));
                  files = fileNames.map(function (fileName) {
                      return _.find(files, function (file) {
                          return file.file === fileName;
                      }) || {
                          file: fileName,
                          serverArgs: ''
                      };
                  });
              }
  
              var tests = files.map(function (file) {
                  return _.merge({}, file, {
                      file: options.pathToTests + '/integration/' + file.file + '.js'
                  });
              });
  
              var groupedTests = _.mapValues(_.groupBy(tests, 'serverArgs'), function (testsArray) {
                  return pre.concat(testsArray);
              });
  
              return Promise.resolve(groupedTests);
          }
docs: Prepares files for testing. Respects INTEGRATION_TESTS_BUCKET env
  variable (on travis we run tests in separate jobs to speed up the whole suite)
  and cli arguments. If there are multiple tests that require same server (same server arguments)
  it would group them together for speed.
  
  @method prepareFiles
  @returns {Promise} immediately resolved with prepared files object
  @example {
  "": [ { file: 'path1', serverArgs: "" } ],
  "--something": [ { file: 'path2', serverArgs: "--something" } ]
  }