Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Partial mocking on superclass is not consistent depending on method signature #384
See the attached test case (using junit 4.x and jmockit 1.30).
When ExpectedInvocation.getDefaultValueForReturnType return a not null object, no cascadingValue is returned in RecordAndReplayExecution.defaultReturnValue and the real implementation is called after exiting recordOrReplay.
In other words, when JMockit knows how to instantiate a defaultReturnValue for the called method, the real implementation is not called, otherwise it returns Void.class and real implementation is called.
I would expect that the real implementation is called on a non mocked instance/class when calling a method in its superclass whatever its prototype.