如何在mockito中使用任何地图?我尝试使用以下代码
when(mockedService.patch("1", Matchers.>any())).thenReturn(object);
与:
when(mockedService.patch("1", anyMap())).thenReturn(object);
但它返回:
org.mockito.exceptions.misusing.InvalidUseOfMatchersException:
Invalid use of argument matchers!
2 matchers expected, 1 recorded.
它只在我放任何(String.class)时才有效:
when(mockedService.patch(any(String.class), Matchers.>any())).thenReturn(object);
但是我想要选择放置实际值而不是任何String