Reputation: 51
I have tried to use Mockito's verify in my JUnit test like this
I want to the and verify this methods
in my class of SocketEngine. How to use Mockito for verify this test? I have search how to use Mockito for void methods but I still get an error like that. and how to fix this problem.
I got error like this: the method verify(T) not applicable for void arguments
Upvotes: 1
Views: 97
Reputation: 16399
You're using verify
wrong. It isn't:
verify((socketEngine.read(server, readerString)));
It's:
verify(socketEngine).read(server, readerString);
Upvotes: 1