Mocking Static Functions in Android
问题 Is there any way I can Mock Static Function in Android using any Mocking Framework. Mockito can mock classes but is insuffiecient to mock Static functions. Any help will be highly appreciated. Thanks in Advance 回答1: Mocking works by using the concepts of Object Orientation, Inheritance etc.... Basically by overriding certain methods & behaviour in objects / instances that look like real objects, because they are subclasses of these real objects. In other words, the mocking part comes in