This is a really newbie question but I don't know how to stub this.
I have to mock a method to return Class like this.
public Class<? extends SomeClass> getAClass();
if I do something like this
when(this.someInstance.getAClass())
.thenReturn(SomeClassThatExtendsSomeClass.class);
I get compilation error.
The method thenReturn(Class<capture#1-of ? extends SomeClass>) in the type OngoingStubbing<Class<capture#1-of ? extends SomeClass>> is not applicable for the arguments (Class<SomeClassThatExtendsSomeClass>)