Yannick De Turck | Devoxx

Yannick De Turck
Yannick De Turck Twitter

From Ordina Belgium

Yannick is a senior Java consultant and practice manager at Ordina Belgium where he has also led a competence center around JVM languages. He’s very much interested in everything Java and Spring related as well as reactive programming, Kotlin, Lightbend technologies, software architectures, and coaching and enabling other colleagues.

Blog: https://ordina-jworks.github.io

java Java, JVM, Javas SE/EE

MockK, the idiomatic mocking framework for Kotlin


If you've developed in Java, you will most likely have used the mocking framework Mockito. While it is a superb framework for mocking in Java, it doesn't really seem to suit Kotlin that well and there are certain limitations or annoyances which you need to get around such as mocking final classes due to the way that Mockito creates its mocks.

MockK is a mocking framework specifically for Kotlin developed by Oleksiy Pylypenko. MockK’s main philosophy is offering first-class support for Kotlin features and being able to write idiomatic Kotlin code when using it.

This session will serve as an introduction to MockK, showcase its features and how to use it in your unit tests.