Open ruazakharo opened 2 years ago
My code:
Settings.Secure.getString(context.contentResolver, Settings.Secure.ANDROID_ID).toLowerCase()
and I'm trying to mock it
Mockito.mockStatic(Settings.Secure::class.java).use { utilities -> utilities.`when`<Any> { Settings.Secure.getString(anyVararg(), anyVararg()) }.thenReturn("test") }
Error :
getString must not be null java.lang.NullPointerException: getString must not be null
mockito vesrion - 4.0.0
My code:
Settings.Secure.getString(context.contentResolver, Settings.Secure.ANDROID_ID).toLowerCase()
and I'm trying to mock it
Error :
mockito vesrion - 4.0.0