Can we use ArgumentMatchers instead for all methods that are defined on that class, to make sure that all matchers are non-null (org.mockito.Matchers.any(Class) accepts null in Mockito 1). This should be a non-breaking change for Mockito 2.
Note that in the future we are likely going to remove the inheritance chain from Mockito to ArgumentMatchers and so mockito-kotlin would break.
For example https://github.com/nhaarman/mockito-kotlin/blob/dbdef2fd74b86868a953e1ba609d235664148f50/mockito-kotlin/src/main/kotlin/com/nhaarman/mockitokotlin2/Matchers.kt#L44 uses
Mockito.any
rather thanArgumentMatchers.any
. SinceMockito
currently inherits fromMatchers
and that in turn inherits fromArgumentMatchers
, this works. However, that inheritance is causing issues for users that use Mockito 1 and need to upgrade to Mockito 2.Can we use
ArgumentMatchers
instead for all methods that are defined on that class, to make sure that all matchers are non-null (org.mockito.Matchers.any(Class)
acceptsnull
in Mockito 1). This should be a non-breaking change for Mockito 2.Note that in the future we are likely going to remove the inheritance chain from Mockito to ArgumentMatchers and so
mockito-kotlin
would break.