I'm trying to mock an exception and then returning it. But i'm having this error which i have no idea:
type="org.mockito.exceptions.misusing.InvalidUseOfMatchersException" org.mockito.exceptions.misusing.InvalidUseOfMatchersException: Invalid use of argument matchers! 2 matchers expected, 4 recorded
My code is:
TitanException e = Mockito.mock(TitanException.class);
long bankId = 111L, productId = 220L, subproductId = 333L;
icctr009.execute(bankId, productId, subproductId);
when(icctr009.titanQueryForListMap(anyString(), anyString(), anyString(), anyMap()))
.thenThrow(e);