我需要根据特定的键值从模拟对象发送一个特定的值.
从具体类:
map.put("xpath", "PRICE");
search(map);
Run Code Online (Sandbox Code Playgroud)
从测试用例:
IOurXMLDocument mock = mock(IOurXMLDocument.class);
when(mock.search(.....need help here).thenReturn("$100.00");
Run Code Online (Sandbox Code Playgroud)
如何为此键值对模拟此方法调用?