Here Utils.java is my class to be tested and following is the method which is called in UtilsTest class. Even if I am mocking Log.e method as shown below
@B
If your are using the org.slf4j.Logger, then just mocking the Logger in test class using PowerMockito worked for me.
@RunWith(PowerMockRunner.class) public class MyClassTest { @Mock Logger mockedLOG; ... }