Mockito Error Is Not Applicable for the Arguments (void)
Solution:
Mockito.doReturn(value)
.when(mockObject)
.myMethod(Mockito.any(MyExecutionContext.class))
Its likely that the return type of the method you are mocking (in above example: mockObject.myMethod) is VOID.
If the return type of the method is 'void' then use this format instead:
doThrow(new PersistenceException("Exception occured")).when(mockObject).myMethod(any());
// Note that we can never return a value when return type is void.