StepVerifier provides a declarative way of creating a verifiable script for an async Publisher sequence by expressing expectations about the events that will happen upon subscription.
TestPublisher is a publisher that you can directly manipulate, triggering onNext, onComplete, and onError events, for testing purposes.
https://medium.com/@BPandey/writing-unit-test-in-reactive-spring-boot-application-32b8878e2f57