static expectRangeRequest(requestSpy, uri, startByte, endByte, isInit) {
    const headers = {};
    if (startByte == 0 && endByte == null) {
      // No header required.
    } else {
      let range = 'bytes=' + startByte + '-';
      if (endByte != null) {
        range += endByte;
      }
      headers['Range'] = range;
    }

    const type = isInit ?
        shaka.net.NetworkingEngine.AdvancedRequestType.INIT_SEGMENT :
        shaka.net.NetworkingEngine.AdvancedRequestType.MEDIA_SEGMENT;

    expect(requestSpy).toHaveBeenCalledWith(
        shaka.net.NetworkingEngine.RequestType.SEGMENT,
        jasmine.objectContaining({
          uris: [uri],
          headers: headers,
        }),
        jasmine.objectContaining({type}));
  }
Expects that a range request for the given segment has occurred.

@param {!Object} requestSpy
@param {string} uri
@param {number} startByte
@param {?number} endByte
@param {boolean} isInit