This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Framework 6.2.1!

@RecordApplicationEvents

@RecordApplicationEvents is an annotation that can be applied to a test class 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.