TestBroker Class
Contains a method that delivers platform event or change event messages in an Apex test.
TriggerContext Class
Provides information about the platform event or change event trigger that’s currently executing, such as how many times the trigger was retried due to the EventBus.RetryableException. Also, provides a method to resume trigger executions.