Mockito – what does verify method do?

Mockito.verify(MockedObject).someMethodOnTheObject(someParametersToTheMethod);
verifies that the methods you called on your mocked object are indeed called. If they weren’t called, or called with the wrong parameters, or called the wrong number of times, they would fail your test.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)