@DataMongoTest annotation used for test cases that only focused on MongoDB components, By default, it will configure an in-memory embedded MongoDB (if available), configure a MongoTemplate, scan for @Document classes, and configure Spring Data MongoDB repositories.
SpringExtension introduced in Spring 5, is used to integrate Spring TestContext with JUnit 5 Jupiter Test.
https://medium.com/@BPandey/writing-unit-test-in-reactive-spring-boot-application-32b8878e2f57