I need to send a specific value from a mock object based on a specific key value.
From the concrete class:
map.put(\"xpath\", \"PRICE\");
search(map);
>
Seems like what you need is an Answer:
IOurXMLDocument doc = mock(IOurXMLDocument.class);
when(doc.search(Matchers.
But what seems like a better idea is to not use primitive Map as parameter to your search method - you could probably transform this map into a pojo with price and productName attributes. Just an idea :)