async function startIn(state) {
      /** @type {!Map<string, function(): !Promise>} */
      const actions = new Map()
          .set('detach', async () => {
            await player.detach();
          })
          .set('attach', async () => {
            await player.attach(video, /* initMediaSource= */ false);
          })
          .set('media-source', async () => {
            await player.attach(video, /* initMediaSource= */ true);
          })
          .set('load', async () => {
            await player.attach(video, /* initMediaSource= */ true);
            await player.load('test:sintel');
          })
          .set('src-equals', async () => {
            await player.attach(video, /* initMediaSource= */ false);
            await player.load(SMALL_MP4_CONTENT_URI, 0, 'video/mp4');
          });

      const action = actions.get(state);
      expect(action).toBeTruthy();
      await action();
      expect(lastStateChange).toBe(state);
    }
Put the player into the specific state. This method's purpose is to make
it easier to see when the test is assuming the starting state of the
player.

For states that require the player to be attached to a media element,
this will ensure that |attach| is called before making the call to move
to the specific state.

@param {string} state
@return {!Promise}