setUp() {
    xhrReader = new MockXhrStreamReader();
    /** @suppress {checkTypes} suppression added to enable type checking */
    xhrStream = new XhrNodeReadableStream(xhrReader);

    propertyReplacer = new PropertyReplacer();
    propertyReplacer.replace(xhrStream, 'handleError_', (message) => {
      // the real XhrNodeReadableStream class ignores any error thrown
      // from inside a callback function, but we want to see those assert
      // errors thrown by the test callback function installed by unit tests
      fail(message);
    });
  }
@suppress {checkTypes,missingProperties} suppression added to enable
type checking