static plugin(uri, request, requestType) {
    const manifestParts = /^test:([^/]+)$/.exec(uri);
    if (manifestParts) {
      /** @type {shaka.extern.Response} */
      const response = {
        uri: uri,
        originalUri: uri,
        data: new ArrayBuffer(0),
        headers: {'content-type': 'application/x-test-manifest'},
        originalRequest: request,
      };
      return shaka.util.AbortableOperation.completed(response);
    }

    const malformed = new shaka.util.Error(
        shaka.util.Error.Severity.CRITICAL,
        shaka.util.Error.Category.NETWORK,
        shaka.util.Error.Code.MALFORMED_TEST_URI);

    const re = /^test:([^/]+)\/(video|audio)\/(init|[0-9]+)$/;
    const segmentParts = re.exec(uri);
    if (!segmentParts) {
      // Use expect so the URI is printed on errors.
      expect(uri).toMatch(re);
      return shaka.util.AbortableOperation.failed(malformed);
    }

    const name = segmentParts[1];
    const type = segmentParts[2];

    const generators = shaka.test.TestScheme.GENERATORS[name];
    expect(generators).toBeTruthy();
    if (!generators) {
      return shaka.util.AbortableOperation.failed(malformed);
    }

    const generator = generators[type];
    expect(generator).toBeTruthy();
    if (!generator) {
      return shaka.util.AbortableOperation.failed(malformed);
    }

    let responseData;
    if (segmentParts[3] === 'init') {
      responseData = generator.getInitSegment(0);
    } else {
      const index = Number(segmentParts[3]);
      responseData = generator.getSegment(index, 0);
    }
    if (!responseData) {
      return shaka.util.AbortableOperation.failed(malformed);
    }

    /** @type {shaka.extern.Response} */
    const ret = {
      uri: uri,
      originalUri: uri,
      data: responseData,
      headers: {},
      originalRequest: request,
    };
    return shaka.util.AbortableOperation.completed(ret);
  }
A plugin that handles fake network requests.  This will serve both segments
and manifests that will point to a fake manifest generator.

The test scheme URIs look like one of the following:
- test:name
- test:name/video/123

@param {string} uri
@param {shaka.extern.Request} request
@param {shaka.net.NetworkingEngine.RequestType=} requestType
@return {!shaka.extern.IAbortableOperation.<shaka.extern.Response>}