I'm trying to write a JUnit test for a piece of code which is given below.
jmsTemplate.send(destination, session ->
{
return getJMSMessage(session, message);
});
Since jmsTemplate is an autowired field I have mocked it in the test. Because of it the response is always successful, but the code inside the send method (return statement) is not covered in the code coverage. How can I cover that?