正如我们可能知道的那样,默认情况下,一旦定义了Kotlin类,它就是最终类,除非它被显式声明为open
.
This would post a challenge when we want to Mock it using Mockito. We need to explicitly declare it as open
. Is there a way we could avoid declaring it as open
while able to Mock it for our testing?