Parametrizing the interface with T means that the type has to be defined at compilation time. The problem is in the way you obtain the myClassMocked
, that's why it's expecting the "any" wildcard ?
.
You should be mocking a subclass of the myClass
interface parametrized with a type that extends SomeClass
for example:
public class myClassImpl implements myClass<SomeSubclassOfSomeClass>{
public void myMethod(SomeSubclassOfSomeClass parameter){...}
public void myOtherMethod(){...}
}