basics Mocking and stubbing suspend functions with MockK How to easily stub or mock suspend function in Kotlin? MockK is the solution. See MockK examples for coroutines.