Our team has made the switch to Kotlin and generally all is good. However, we have a persistent issue with mocking when writing tests. Mockito 2 has alleviated this somewhat, but we still have the problem of testing code that calls extension functions.
As extension functions are static, Mockito refuses to deal with them and tools like PowerMock and JMockit provide clumsy solutions (if we can get them working at all).
Extension functions are a big feature of Kotlin and we make heavy use of them in our libraries and it is currently pretty crippling that we cannot test these effectively without having to resort to a higher level of testing or by breaking encapsulation and mocking the code called by the extension function itself.
Therefore the question is, what is the preferred approach to mocking in Kotlin? What are the best frameworks/techniques to use? Is there a Kotlin-specific mocking tool available/in-dev? How do JetBrains test the stdlib (which makes extensive use of extension functions)?