Prev Next

Testing / Mockito Interview Questions

How do you mock private methods using Mockito?

Declare the methods as protected and mark them with the annotation @visibleForTesting.

More Related questions...

Show more question and Answers...


Comments & Discussions