android – How about writing test code for the viewmodel below?

I created a view model to handle authentication (login and register), but I’m having trouble writing unit testing code. Can anyone help me write unit testing code for the view model below? Authentication View Model: class AuthenticationViewModel(private val userRepository: UserRepository) : ViewModel() { var user = MutableLiveData<Event<UserModel>>() var loading = MutableLiveData<Event<Boolean>>() var message = MutableLiveData<Event<String>>() … Read more