-
Bug
-
Resolution: Incomplete
-
P4
-
None
-
13
-
x86_64
-
os_x
A DESCRIPTION OF THE PROBLEM :
The Java compiler fails with a Null Pointer Exception when attempting to use the org.mockito.ArgumentMatchers.eq function to mock a call. Code example:
doReturn(responseEntity)
.when(restTemplate)
.exchange(
anyString(),
eq(HttpMethod.POST),
any(HttpEntity.class),
eq(new ParameterizedTypeReference<>() {}));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compilation works, or I am given the correct warning about why the code cannot compile
ACTUAL -
Compilation process errors out
FREQUENCY : always
The Java compiler fails with a Null Pointer Exception when attempting to use the org.mockito.ArgumentMatchers.eq function to mock a call. Code example:
doReturn(responseEntity)
.when(restTemplate)
.exchange(
anyString(),
eq(HttpMethod.POST),
any(HttpEntity.class),
eq(new ParameterizedTypeReference<>() {}));
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Compilation works, or I am given the correct warning about why the code cannot compile
ACTUAL -
Compilation process errors out
FREQUENCY : always