I am using Mockito to mock a certain class while writing my test cases.
Is there a way to print some statements before returning a value? Like:
when(x.callFunction(10).thenReturn(new String("Hello"));
The above statement works, however I am not able to do the following:
when(x.callFunction(10).thenReturn({
System.out.println("Mock called---going to return hello");
return new String("Hello");});