I’ve been struggling real hard to come up with a reliable way to unit test Kotlin’s Object Classes (https://kotlinlang.org/docs/reference/object-declarations.html).
I tried using MockK Library as well but it ends up calling actual method on Object class instead of mocking it. I will keep investigating this part though meanwhile.
However, my main question being, is there any real way to unit test Object class without using MockK Library to begin with?
Just for context, I have two Object classes where class A is calling another Object class B and I am trying to write unit tests for Class A and is in need of mocking Class B.