Kafka Mockito testing in Spring Boot
I noticed a problem that I can’t properly test the listen() method marked with the @KafkaListener
annotation, because even if I create a mock object of my Kafka Consumer, when sending a message, using kafkaTemplate.send(), it will not be the mock object that is called.