function createMockCastSender(
      appId, onCastStatusChanged, onFirstCastStateUpdate,
      onRemoteEvent, onResumeLocal) {
    expect(appId).toBe(fakeAppId);

    mockSender = {
      init: jasmine.createSpy('init'),
      destroy: jasmine.createSpy('destroy'),
      apiReady: jasmine.createSpy('apiReady'),
      hasReceivers: jasmine.createSpy('hasReceivers'),
      isCasting: jasmine.createSpy('isCasting'),
      receiverName: jasmine.createSpy('receiverName'),
      hasRemoteProperties: jasmine.createSpy('hasRemoteProperties'),
      setAppData: jasmine.createSpy('setAppData'),
      forceDisconnect: jasmine.createSpy('forceDisconnect'),
      showDisconnectDialog: jasmine.createSpy('showDisconnectDialog'),
      cast: jasmine.createSpy('cast'),
      get: jasmine.createSpy('get'),
      set: jasmine.createSpy('set'),
      // For convenience:
      onCastStatusChanged: onCastStatusChanged,
      onFirstCastStateUpdate: onFirstCastStateUpdate,
      onRemoteEvent: onRemoteEvent,
      onResumeLocal: onResumeLocal,
    };
    mockSender.cast.and.returnValue(Promise.resolve());
    return mockSender;
  }
@param {string} appId
@param {Function} onCastStatusChanged
@param {Function} onFirstCastStateUpdate
@param {Function} onRemoteEvent
@param {Function} onResumeLocal
@return {!Object}