I have following jar in my project and I haven't seen any problems up to now:
mockito-all-1.10.19.jar
Due to project maturity I am not able to shift to newer Mockito version.
I am lacking any*() methods that I need: these are anyObject() and anyString(). These are static methods of Mockito 2.2.7 API. Are they missing in 1.10 version and subversions.
Source: https://static.javadoc.io/org.mockito/mockito-core/2.2.7/org/mockito/ArgumentMatchers.html#anyList()
How can I replace those methods - maybe there had been present some deprecated methods I could use?
You should use:
any(Object.class);
any(String.class);
https://static.javadoc.io/org.mockito/mockito-core/1.10.19/org/mockito/Matchers.html#any(java.lang.Class)
Since Mockito
extends Matchers
you can get all the matchers with:
import static org.mockito.Mockito.*
... which is the style recommended by Mockito.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With