Mocking of static method in unit testing

While we do unit testing, we mostly encounter the situation where we need to do the unit testing of a method which is calling a static method. if we are using mockito for doing mocking, We will have to suffer as mockito don't provide Static method mocking.

We need to mock the static class which is being used in a click here method for which we are writing unit test.

Mocking of static method in unit testing

Leave a Reply

Your email address will not be published. Required fields are marked *