我试图找出一个方法调用,例如
when(amazonDynamoDBClient.batchWriteItem(anyObject())).thenReturn(batchWriteItemResultMock);
我收到此错误
错误:(198,34)java:对batchWriteItem的引用不明确 com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient中的方法batchWriteItem(com.amazonaws.services.dynamodbv2.model.BatchWriteItemRequest)和com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient匹配中的方法batchWriteItem(java.util.Map>)
我无法看出这是多么模糊 - 方法签名是不同的,即
public BatchWriteItemResult batchWriteItem(BatchWriteItemRequest request) {
和
public BatchWriteItemResult batchWriteItem(Map<String, List<WriteRequest>> requestItems) {
我在这里做错了什么?