6

Can anyone could elaborate about PowerMock and PowerMockito. I didn't even get documentation for powermockito. Both used for mocking static and private methods in different way I guess. what are the similarities and usages? which one is better?

anand krish
  • 3,655
  • 4
  • 37
  • 44
  • Possible duplicate of [PowerMock + Mockito VS Mockito alone](https://stackoverflow.com/questions/6036450/powermock-mockito-vs-mockito-alone) – pvpkiran Nov 02 '17 at 10:03
  • 3
    That is for how PowerMock is build on top of Mockito. I need about powermockito, This is also build on top of Mockito only. I asked diff about PowerMock and PowerMockito not for PowerMock and Mockito – anand krish Nov 02 '17 at 10:14
  • 4
    PowerMock is a framework that extends other mock libraries such as EasyMock with more powerful capabilities. PowerMock uses a custom classloader and bytecode manipulation to enable mocking of static methods, constructors, final classes and methods, private methods, removal of static initializers and more. PowerMockito is a PowerMock’s extension API to support Mockito. – want2learn Nov 02 '17 at 17:13
  • The PowerMock framework provides a class called PowerMockito used to create mock objects and initiates verification and expectation. The PowerMockito provides the functionality to work with the Java reflection API. – syed wasim nihal Feb 03 '21 at 11:54

0 Answers0