JUnit5 test with LiveData doesn't execute subscriber's callback
问题 Background: I have a simple application that fetches movie list using rests API call. The project structure is given below, Activity -> ViewModel -> Repository -> ApiService (Retrofit Interface) The activity subscribes to a LiveData and listens for events changes The ViewModel hosts the MediatorLiveData observed by the activity. Initially the ViewModel sets a Resource.loading(..) value in MediatorLiveData . The ViewModel then calls the repository to get the movie list from ApiService The