testToggleBegin() {
    let animationsPlayed = 0;
    let toggleEventsFired = 0;

    propertyReplacer.replace(Animation.prototype, 'play', function() {
      animationsPlayed++;
      this.dispatchAnimationEvent(Transition.EventType.BEGIN);
      this.dispatchAnimationEvent(Transition.EventType.END);
    });
    propertyReplacer.replace(
        AnimatedZippy.prototype, 'onAnimate_', functions.NULL);

    events.listenOnce(
        animatedZippy,
        AnimatedZippy.Events
            .TOGGLE_ANIMATION_BEGIN, /**
                                        @suppress {checkTypes} suppression added
                                        to enable type checking
                                      */
        (e) => {
          toggleEventsFired++;
          assertTrue(
              'TOGGLE_ANIMATION_BEGIN event must be for expansion', e.expanded);
          assertEquals(
              'expanded must be false', false, animatedZippy.isExpanded());
          assertEquals(
              'aria-expanded must be true', 'true',
              aria.getState(animatedZippyHeaderEl, State.EXPANDED));
        });

    animatedZippy.expand();

    events.listenOnce(
        animatedZippy,
        AnimatedZippy.Events
            .TOGGLE_ANIMATION_BEGIN, /**
                                        @suppress {checkTypes} suppression added
                                        to enable type checking
                                      */
        (e) => {
          toggleEventsFired++;
          assertFalse(
              'TOGGLE_ANIMATION_BEGIN event must be for collapse', e.expanded);
          assertEquals(
              'expanded must be true', true, animatedZippy.isExpanded());
          assertEquals(
              'aria-expanded must be false', 'false',
              aria.getState(animatedZippyHeaderEl, State.EXPANDED));
        });

    animatedZippy.collapse();

    assertEquals('animations must play', 2, animationsPlayed);
    assertEquals(
        'TOGGLE_ANIMATION_BEGIN events must fire', 2, toggleEventsFired);
  }
Tests the TOGGLE_ANIMATION_BEGIN event.
@suppress {checkTypes} suppression
     added to enable type checking