I suspect this isn’t possible as the anonymous inner class is private.
Can I verify that the method was called without worrying about the argument?
I’m tying to test this:
http://bsnyderblog.blogspot.com/2010/02/using-spring-jmstemplate-to-send-jms.html
With something like:
verify(jmsTemplate, times(1)).send();
But send() needs an argument.
Is there some other way to unit test sendMessages()?
Can you just do
verify(jmsTemplate, times(1)).send(anyObject())?