Mock final classes on Kotlin Dec 03, 2019 / Tests internal class Foo { internal fun bar(x: Int, y: Int, zip: Zip) = x + y + zip.doIt() } internal class Zip { internal fun doIt() = 0 } When we have two classes like above and try to mock Zip class like below: Keep Reading