Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Mocked generic method returns incorrect mocked type #435
Code to Reproduce
I also have this case (ATest.failingTest() in the zip below) which fails under the same versions and I can't seem to condense any further. It does involve a generic method so I'm wondering if it has the same cause as this bug, but in this case the generic method does seem to return the correct type, but the test fails later due to an NPE which happens immediately after a null check on the returned object.
EDIT: Condensed the example case somewhat. Does seem related to this generics issue as removing a generic parameter from a method does make it pass. The issue does seem to manifest itself slightly differently than the case described above though.