The EventBus namespace provides classes and
methods for platform events.
The following are the classes in the EventBus
namespace.
TestBroker Class
Contains a method that delivers platform event messages in an Apex test.
TriggerContext Class
Provides information about the platform event trigger that’s currently executing, such as how many times the trigger was retried due to the EventBus.RetryableException.