I have a kotlin Android app. There is a function that loads compositions from the backend and returns them to a callback:
getCompositons(callback: (Array<
You can do that like this:
val function: Array) -> Unit = {} val callback = mock(function::class.java) getCompositons(callback) verify(callback)(any()) // or for example verifyNoInteractions(callback)
No extra libraries besides the standard mockito are needed