static createFakePresentationTimeline(
      segmentAvailability, presentationDuration, maxSegmentDuration, isLive) {
    const timeline = new shaka.test.FakePresentationTimeline();

    timeline.getDuration.and.returnValue(presentationDuration);
    timeline.getMaxSegmentDuration.and.returnValue(maxSegmentDuration);
    timeline.isLive.and.returnValue(isLive);
    timeline.isInProgress.and.returnValue(false);

    timeline.getSeekRangeStart.and.callFake(
        () => segmentAvailability.start);

    timeline.getSeekRangeEnd.and.callFake(
        () => segmentAvailability.end);

    timeline.getSegmentAvailabilityStart.and.callFake(
        () => segmentAvailability.start);

    timeline.getSegmentAvailabilityEnd.and.callFake(
        () => segmentAvailability.end);

    return timeline;
  }
Creates a fake PresentationTimeline.

The FakePresentationTimeline has two special properties:
|segmentAvailabilityStart| and |segmentAvailabilityEnd|, which set the
return value of getSegmentAvailabilityStart() and
getSegmentAvailabilityEnd() respectively.

@param {{start: number, end: number}} segmentAvailability The segment
  availability window, which the caller can adjust by reference during a
  test.
@param {number} presentationDuration
@param {number} maxSegmentDuration
@param {boolean} isLive
@return {!shaka.test.FakePresentationTimeline} A PresentationTimeline
  look-alike.