Debug Wrapper around NotificationCenter

I've been struggling with writing some dependency injection types for Foundation types like NotificationCenter, UIDevice, etc. I've created a sample package to demonstrate: https://github.com/MFB-Technologies-Inc/notification-center-client-demo.

The goal is to mimic NotificationCenter's Publisher and notifications AsyncSequence.

LiveNotificationCenterClientTests.testStream will fail unless it's run in isolation. If more than one test is run, it will never complete because no values are ever received from the stream.

MockNotificationCenterClientTests.testPublisher fails because the expectations are not fulfilled before the timeout. For whatever reason, the published values are not being received in the sink. MockNotificationCenterClientTests.testStream never completes because the value is being endlessly awaited.

It seems that there are some fundamental things about concurrency that I'm getting wrong. Can anybody help me debug this? For the two stream tests, I know I could rewrite them to fail with a timeout like the publisher tests but that's not the real problem.