For the latest stable version, please use Spring Framework 6.2.1!

@RecordApplicationEvents

@RecordApplicationEvents is a class-level annotation that is used to instruct the Spring TestContext Framework to record all application events that are published in the ApplicationContext during the execution of a single test.

The recorded events can be accessed via the ApplicationEvents API within tests.

See Application Events and the @RecordApplicationEvents javadoc for an example and further details.