Details
Description
We are experiencing difficulties when trying to (partially) mock methods with covariant return types. EasyMock sees both methods (the overridden and overriding one) and throws an exception or behaves JRE-dependant.
The attached test case show the different failures.
Maybe this is a Java bug, but possibly EasyMock could work around it.
Best regards
Marcel Freese
The problem comes from bridge methods. They should not be ignored by addMockedMethod which should find the real method instead of the bridge.
Filtering the bridge methods seems to solve it all.