I would say you rediscovered the power of interfaces, as this was the only way of mocking (to what I know) before mocking frameworks arose.
What you described does not only apply to Kotlin or Lambdas but all programming languages with interface support.
So thanks to Eyal Guthmann for his suggestion and to you for writing this article. The Kotlin library I'm working on (Koodies) renounces mocking frameworks completely.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would say you rediscovered the power of interfaces, as this was the only way of mocking (to what I know) before mocking frameworks arose.
What you described does not only apply to Kotlin or Lambdas but all programming languages with interface support.
So thanks to Eyal Guthmann for his suggestion and to you for writing this article. The Kotlin library I'm working on (Koodies) renounces mocking frameworks completely.