How do I mock `resolve` extension from Kotlin stdl...
# mockk
d
How do I mock
resolve
extension from Kotlin stdlib on a File? I tried this, but it still seems to call the Kotlin code:
Copy code
fun mockFile() = mockk<File>().apply {
	every { resolve(any<File>()) } answers { mockk<File>(relaxed = true).apply {
		every { path } returns "this.txt"
	} }
}

// Gives
path must not be null
java.lang.IllegalStateException: path must not be null
	at kotlin.io.FilesKt__FilePathComponentsKt.isRooted(FilePathComponents.kt:81)
	at kotlin.io.FilesKt__UtilsKt.resolve(Utils.kt:400)
g