Mockito Kotlin lateinit property X has not been initialized
Let’s look at this code: You see, that we have mock of myClass, that prepared by Mockito. In the same time we have object of MyClass inside companion object, that we prepared ourselves. If you run this test with Kotlin 1.6.0 (and around) for instance, you’ll get this error: But, with Kotlin 1.4.32 and around, this stuff works fine. We […]
READ MORE