function assertMethods(obj, methodNames, message) {
  methodNames.forEach(function(methodName) {
    var hasMethod = typeof obj[methodName] == 'function';
    if (!hasMethod) {
      throw new Error('Missing method \'' + methodName + '\' from ' + message);
    }
  });
}
Checks that the given methods exist on the given object.
@param {!*} obj
@param {!Array<string>} methodNames
@param {string} message Debug message.