Unraveling MockK’s black magic

This article is an English version of the blog. All credits belong to oboenikui.

MockK is a mocking library written in Kotlin and for Kotlin. In addition to the traditional functionality provided by JVM based mocking libraries, Kotlin’s language feature significantly improves MockK’s usability.

However, aside from MockK, have you ever wondered how a JVM based mocking library works…