Mockito ambiguous method call
For me, using isA()
fixed the issue.
Docs : IsA
You have two methods with the same name and return type, each with one parameter. So anyObject()
matches both of them. That's why you get the batchWriteItem is ambiguous
message.
You could use Mockito.any(Class<T> type)
and Mockito.anyMapOf(Class<K> keyClazz, Class<V> valueClazz)
to distinguish between them.
Docs for reference: any, anyMapOf