I've been trying to implement PowerMockito.Answer for awhile and still stuck.. here is the code
PowerMockito.mockStatic(testLog.class);
PowerMockito.doAnswer(new Answer<Void>() {
public Void answer(InvocationOnMock invocation) throws Throwable {
//Method method = invocation.getMethod();
System.out.println("This Method got called ");
return null;
}
}).when(testLog.class);
//calling the testLog.log method
testLog.log(....)
It will run just fine but without saying the println... please help....!! Regards
James