code: function () {
    var handlers = {};
  
    function raise (ev) {
      if (handlers[ ev ]) {
        handlers[ ev ].apply(undefined, Array.prototype.slice.call(arguments, 1));
      }
    }
  
    function on (ev, handle) {
      handlers[ ev ] = handle;
    }
  
    function reset () {
      handlers = {};
      this.close = noOp;
      this.createChannel = noOp;
      this.createConfirmChannel = noOp;
      this.release = noOp;
    }
  
    var instance = {
      acquire: function () {
        this.raise('acquiring');
        return Promise.resolve();
      },
      item: { uri: '' },
      close: noOp,
      createChannel: noOp,
      createConfirmChannel: noOp,
      on: on,
      raise: raise,
      release: noOp,
      reset: reset
    };
    setTimeout(instance.acquire.bind(instance), 0);
    return instance;
  }
docs: /* globals expect