I am having one class like this,
class Random {
public String abc(String one, String two, Map<String, String> three){
..
}
}
Now from test class I have created a mock object like
@Mock
private Random mockRandom;
Then I am trying to mock this like
Mockito.lenient().when(mockRandom.abc(any(String.class),any(String.class),any(Map.class))).thenReturn(“Test value”);
After this also when I am running a test case then this abc method is not giving “Test value”.