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
Error Mocking Abstract Class With Inherited Methods With Enum Return Type #116
I'm getting a NoSuchMethodException when I try to call a method of an abstract class that has inherited a method from an interface with a return type of an enum but has not implemented it. If implemented, it works correctly, but does not if unimplemented. I've demonstrated that below, as well as how it works correctly if unimplemented with a non-enum return type, such as a String. I'm using the following:
Here is an example in unit test form:
For me, testEnum() fails and testImplementedEnum()/testUnimplementedString() work.