At 31:22, mockFlutterBlue.state and mockFlutterBlue.isAvailable should probably use expectAsync0. I think this widget test happens to be waiting long enough for the .state and .isAvailable promises to resolve, by virtue of the await tester.pump() being called, but if this were instead an async unit test, it very well might require an expectAsync0 to prevent the test from finishing before those promises have a chance to resolve. api.flutter.dev/flutter/test_api/expectAsync0.html