I have written a kafka message listener like this.
@KafkaListener(groupId = "group", topics = "topic")
public void consume(String message) {
log.info(message);
serviceProcess.process(message);
}
ServiceProcess{
public boolean process(String str){
//some logic here.
}
}
Write now I need to write the test case for this only. The problem is the jacoco is showing 0 coverage when I am using Embedded methodology. I have to write it in Mockito only.
- This is a void type of method.
- Test case should be in Mockito.