function testQuota(mechanism, minimumQuota) {
  var buffer = '\u03ff';  // 2 bytes
  var savedBytes = 0;
  try {
    while (buffer.length < minimumQuota) {
      buffer = buffer + buffer;
      mechanism.set('foo', buffer);
      savedBytes = buffer.length;
    }
  } catch (ex) {
    if (ex != ErrorCode.QUOTA_EXCEEDED) {
      throw ex;
    }
  }
  mechanism.remove('foo');
  assertTrue(savedBytes >= minimumQuota);
}
@param {!Mechanism} mechanism
@param {number} minimumQuota