dave08
10/16/2017, 10:05 AMclass EventBusServiceEndpoint(val vertx: Vertx): ServiceEndpoint {
override suspend fun <I, R> register(id: String, processor: (I) -> R) {
vertx.eventBus().consumer<I>(vertx, id).consumeEach {
it.reply(processor(it.body()))
}
}
}
I want to mock the ServiceEndpoint interface and verify this function was called like this:
runBlocking {
verify(endpointMock).register<ConnectedDevice, Int>("device_connected", DeviceServiceImpl::deviceConnected)
}
But the IDE gives me an Unsupported [Callable references to suspend functions], is there any way of doing this test? Using mockito 2.10.0 and coroutines 0.19.1