Observes a LiveData value until it receives a new value, returning that new value when it gets one unless the timeout is reached.
Helper function for mocking MainScope and use TestCoroutineScope as CoroutineScope.