When upgrading Kotlin to 1.6.10 and increasing the language level to > 1.5, several tests start to fail with

WARNING: Non instrumentable classes(skipped): class CustomInterfaceTests$Config$$Lambda$311/0x00000008001da440

Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock
io.mockk.MockKException: Missing mocked calls inside every { ... } block: make sure the object inside the block is a mock

One workaround to this is to make the mock target object an actual class implementation instead of a lambda implementation of a interface.

See: - https://github.com/mockk/mockk/issues/781