I have method that accept argument of Object type. But inside of method checked if is e.g. List type. Is possible in mockito to stub it? E.g.
public void checkValue(Object arg) {
if (arg instanceof List) {
....
So in mockito:
Object myObject=mock(Object.class);
After I need write something like:
when (myObject instanceof List).thenReturn List
How it can be done? Thanks.