Can a method call with an anonymous inner class as an argument be verified with mockito?
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-j开发者_开发问答mstemplate-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())
?
精彩评论