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.
Refactoring Java Mockito based test suite to Mockito-Kotlin DSL