uhe
04/26/2016, 7:45 AMfun stubExecutor(executorService: ExecutorService): Future<*> {
val future: Future<*> = mock()
whenever(executorService.submit(any())).then {
val runnable = it.arguments[0] as Runnable
runnable.run()
return@then future
}
return future
}