Most of the times while stubbing with Mockito or MockK you will use doReturn construction. But do you know, that you can stub your test double method in other way – with doAnswer. Let's take a look a both stubbing types.
Mockito cannot mock/spy because your class is final class? We can fix that.
How to easily stub or mock suspend function in Kotlin? MockK is the solution. See MockK examples for mocking coroutines.