Complete the code to create a ViewModel instance in a test.
val viewModel = [1]()Complete the code to observe LiveData value changes in a test.
viewModel.data.observeForever [1]Fix the error in the test code to get LiveData value synchronously.
val value = viewModel.data.[1]()Fill both blanks to mock a repository and inject it into ViewModel for testing.
val mockRepo = [1]() val viewModel = MyViewModel([2])
Fill all three blanks to verify a repository method call in ViewModel test.
verify(exactly = [1]) { mockRepo.[2]([3]) }
