-
How to let junits know that they need to be run using PowerMock?
-
- @RunWith(Junits)
- @RunWith(PowerMockRunner.class)
- @RunWith(PowerMock)
- @PowerMock
- None of these
Correct Option: A
@RunWith(PowerMockRunner.class) signifies to use PowerMock JUnit runner. Along with that @PrepareForTest(User.class) is used to declare the class being tested. mockStatic(Resource.class) is used to mock the static methods.