Mockito 'Misplaced argument detected here' in Java
问题 So I have this Mockito unit test: @Test public void createCard() { when(jwtServiceMock.getId(anyString())).thenReturn(validUserToken); when(profileServiceMock.getProfile(validUserToken)).thenReturn(mock(Profile.class)); when(cardServiceMock.countViewableCardsCreatedOrOwnedBy(anyObject())).thenReturn(5L); when(cardServiceMock.countCardsCreatedOrOwned(anyObject())).thenReturn(10L); final Card expectedCard = getCard(); when(cardServiceMock.createCard(anyString(), anyListOf(String.class),