Can anyone tell me why mocking "startup" is so slow in Kotlin?
The first test that uses mocks takes seconds (2-3 with mockk and 1-2 with Mockito). The rest take milliseconds.
There is no such overhead in Java with Mockito.
Way to reproduce: Write two tests (can be two methods in the same test class) using mockk. First test that creates mocks using mockk takes 2-5s, the next one will run in milliseconds. Compile and with IntelliJ or Gradle, the effect is the same.
Does anyone else have this problem?