I have a function as follows:
class A {
static funcA(HashMap<String, Boolean> h);
}
I have to mock this method funcA
So, I am doing
PowerMockito.when(A.funcA(anyObject());
Now, I am getting the error that the funcA is not applicable to Object. How can i get a matching for a hashmap, like anyString(), or anyInt() ?
Try doing this:
which should match any instance of the class you specify (which is
HashMapin this example)