The PR shows how to reproduce this bug. Only the last commit is relevant, the other ones are already submitted, but not merged by @Gael 😞
The problem can be described like this:
You have in your project a class that you have to mock for some reason and this class has a method with a NodeList as input parameter. The NodeList may have a generic parameter. If the method in your class has the generic type in its signature, the complete class cannot be mocked.
If you remove the generic type from the NodeList parameter everything is fine and runs.
In this test case, I used the Mockito#mock(), but this behaviour can be seen on the @Mock annotation, too.
I'm afraid this can also be a problem for other classes, so we should fix this. I try to work on this, but maybe someone else has the same problem and may join to solve it. 😄
The PR shows how to reproduce this bug. Only the last commit is relevant, the other ones are already submitted, but not merged by @Gael 😞
The problem can be described like this: You have in your project a class that you have to mock for some reason and this class has a method with a
NodeList
as input parameter. TheNodeList
may have a generic parameter. If the method in your class has the generic type in its signature, the complete class cannot be mocked. If you remove the generic type from theNodeList
parameter everything is fine and runs.In this test case, I used the
Mockito#mock()
, but this behaviour can be seen on the@Mock
annotation, too.I'm afraid this can also be a problem for other classes, so we should fix this. I try to work on this, but maybe someone else has the same problem and may join to solve it. 😄