Spring Boot - Testing Spring Boot Applications
You have a Spring Boot service
NotificationService that depends on EmailSender. You want to test NotificationService without sending real emails. Which setup correctly uses @MockBean to mock EmailSender and verify sendEmail() was called once during the test?