My getUserDetails class accepts User (the custome class) and the string as arguments and returns the user. If I use mockito pairing as shown below:
when(authService.getUserDetails(any(User.class),anyString())).thenReturn(any(User.class));
It gives me an InvalidUseOfMatchersException. Expected 2 matches, 3 found. Can't I use the above expression?
source
share