I’m developing a spring boot application. in a method, I create a kafka message to be sent.
In unit testing, I can check if the kafkaTemplate is called for sending message or not using mockito. But in integration tests, I could not examine produced messags, because while I use testcontainer and real kafka server, but there is no way to query or listen to testcontainer kafka server.
I’m asking is there any settings, tools, methods, or other things that allow me to check if a message has been sent and the sent message is what I expected?
Also logging the message can help me testing receivers’ services with actual values