anchor.diff:  
       navigatorKey.currentState.push(route2);
       await tester.pumpAndSettle();
  -    verify(navigatorObserver.didPush(any, any)).called(greaterThanOrEqualTo(1));
  +    expect(navigatorObserver.invocations.removeLast(), NavigatorInvocation.didPush);
   
       await tester.dragFrom(const Offset(5, 100), const Offset(100, 0));
  -    verify(navigatorObserver.didStartUserGesture(any, any)).called(1);
  +    expect(navigatorObserver.invocations.removeLast(), NavigatorInvocation.didStartUserGesture);
       await tester.pump();
       expect(tester.getTopLeft(find.text('2')).dx, moreOrLessEquals(100));
       expect(navigatorKey.currentState.userGestureInProgress, true);
  
positive.code:   });
  }
  
  class MockNavigatorObserver extends Mock implements NavigatorObserver {}
  
  class PopupObserver extends NavigatorObserver {
    int popupCount = 0;
  
negative.code:     // Back to the page covering the whole screen.
      expect(tester.getTopLeft(find.text('2')).dx, moreOrLessEquals(0));
      expect(navigatorKey.currentState.userGestureInProgress, false);
  
      expect(navigatorObserver.invocations.removeLast(), NavigatorInvocation.didStopUserGesture);
      expect(navigatorObserver.invocations.removeLast(), isNot(NavigatorInvocation.didPop));
  
      await tester.dragFrom(const Offset(5, 100), const Offset(500, 0));
      await tester.pump();
      expect(tester.getTopLeft(find.text('2')).dx, moreOrLessEquals(500));
      expect(navigatorKey.currentState.userGestureInProgress, true);
      expect(navigatorObserver.invocations.removeLast(), NavigatorInvocation.didPop);
  
      // Did go far enough to snap out of this route.
      await tester.pump(const Duration(milliseconds: 301));
  