docs: function validateData(validator, schemaId, data, expected) {
      var result = validator.validate(schemaId, data);
      if (!result && expected || result && !expected) {
          if (!result) {
              return new Error(validator.errorsText());
          }
          else {
              return new Error('expected schema violation, but get conformity.');
          }
      }
  }