checkServicesAreInactive

@MainThread
fun checkServicesAreInactive()

Checks that all LifecycleOwners provided to the <Service>.createApi() methods, within this process, are stopped or destroyed. Throws IllegalStateException if check fails.

This method helps to facilitate waiting in between test executions for the moment when services used in test activity are not active anymore and can be reset with resetServices. Waiting is needed because services hosted in other processes may refer services in main process and keep them alive, until they stop and then main process will know that services have no more clients.