New answers tagged java
Yes, you can verify daoInterface.insert is called with verify(daoInterface).insert(anyObject());, but you have to mock DaoInterface first with DaoInterface db = mock(DaoInterface.class);. verify(daoInterface).insert(entity); will fail all the time because entity object from verify's argument and entity inside serviceMessage() are different instance. Instead, ...
If you want to learn Selenium as an automation tool, I'd suggest you to learn it via one of the best blog and get your queries answered as well: http://aroraglobalservices.blogspot.com
Top 50 recent answers are included