I got the the typical problem “I can’t use Mockito...
# getting-started
c
I got the the typical problem “I can’t use Mockito at all, if I don’t make my classes open”, but once I do that, I try to mock a dependency and I get this error when I try to access to a lazy var declared in that class:
Copy code
java.lang.NullPointerException
	at com.cesards.android.xxx.data.common.cloud.SampleApiClient.getRetrofitClient(GembasApiClient.kt:21)
	at com.cesards.android.xxx.data.googlemaps.cloud.GoogleMapsApiClient$service$2.invoke(GoogleMapsApiClient.kt:13)
	at com.cesards.android.xxx.data.googlemaps.cloud.GoogleMapsApiClient$service$2.invoke(GoogleMapsApiClient.kt:10)
	at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130)