Testing Your Platform Event in Apex
Add Apex tests to test platform event subscribers. Before you can package or deploy
Apex code, including triggers, to production, it must have tests and sufficient code coverage.
Add Apex tests to provide code coverage for your triggers.