I want to simulate the response of the following method:
public JobResult getJobResult(String jobId, int pageSize, String cursor)
The following way:
when(analyticsApi.getJobResult(any(), any(), any())).thenReturn(jobResult);
But Mockito fails with the following error:
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.mockito.ArgumentMatchers.any()" is null