I have a method:
public V doSomething(T t, Class<V> classV){}
how can I invoke this method with the mockObject and verify it?
I'm trying like this:
when(mockObject.doSomething(any(MyConcreteT.class), AnotherConcrete.class).
thenReturn(obj);
verify(mockObject).doSomething(any(MyConcreteT.class), AnotherConcrete.class);
but receive an error
InvalidUseOfMatchersException: Invalid use of argument matchers!
appreciate any(help)
AFAIK, Mockito requires all parameters to be non-matchers or all parameters to be matchers. It doesn't allow to mix them. (A detailed error message should tell you this, though.)
Try: