anchor.diff:      WidgetsBinding.instance!.removeObserver(observer);
     });
   
  -
     testWidgets('didPushRouteInformation callback with null state', (WidgetTester tester) async {
       final PushRouteInformationObserver observer = PushRouteInformationObserver();
       WidgetsBinding.instance!.addObserver(observer);
  
positive.code:   });
  
    testWidgets('handleLifecycleStateChanged callback', (WidgetTester tester) async {
      final BinaryMessenger defaultBinaryMessenger = ServicesBinding.instance!.defaultBinaryMessenger;
      final AppLifecycleStateObserver observer = AppLifecycleStateObserver();
      WidgetsBinding.instance!.addObserver(observer);
  
      ByteData message = const StringCodec().encodeMessage('AppLifecycleState.paused')!;
      await defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) { });
      expect(observer.lifecycleState, AppLifecycleState.paused);
  
      message = const StringCodec().encodeMessage('AppLifecycleState.resumed')!;
      await defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) { });
      expect(observer.lifecycleState, AppLifecycleState.resumed);
  
      message = const StringCodec().encodeMessage('AppLifecycleState.inactive')!;
      await defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) { });
      expect(observer.lifecycleState, AppLifecycleState.inactive);
  
      message = const StringCodec().encodeMessage('AppLifecycleState.detached')!;
      await defaultBinaryMessenger.handlePlatformMessage('flutter/lifecycle', message, (_) { });
      expect(observer.lifecycleState, AppLifecycleState.detached);
    });
  
    testWidgets('didPushRoute callback', (WidgetTester tester) async {
  
negative.code:     final ByteData message = const JSONMethodCodec().encodeMethodCall(
        const MethodCall('pushRouteInformation', testRouteInformation),
      );
      await ServicesBinding.instance!.defaultBinaryMessenger
          .handlePlatformMessage('flutter/navigation', message, (_) {});
      expect(observer.pushedRoute, 'testRouteName');
      WidgetsBinding.instance!.removeObserver(observer);
    });
  