IttayD
IttayD

Reputation: 29123

mockito: how to verify calls on real implementation?

I'd like to verify calls to a logger object, so that the real implementation is still called (so I can see the output during tests).

Something like

verify(logger).error(anyString())

Upvotes: 6

Views: 5744

Answers (1)

Kalarani
Kalarani

Reputation: 407

you need to use spy to verify invocations on real objects.

Upvotes: 7

Related Questions