title: MediatorLiveData doesn't work in JUnit tests?
body: <p>So I've tried using MediatorLiveData for the rather simple use-case of converting an ISO country code (e.g. "US") to a country calling code (e.g. "+1") through the use of libphonenumber. The resulting screen works fine, but seems to fail JUnit tests, even when InstantTaskExecutorRule is used.</p>
  
  <p>Example minimal unit test (in Kotlin) that I believe should pass, but fails instead:</p>
  
  <pre><code>import android.arch.core.executor.testing.InstantTaskExecutorRule
  import android.arch.lifecycle.MediatorLiveData
  import android.arch.lifecycle.MutableLiveData
  import org.junit.Assert.assertEquals
  import org.junit.Rule
  import org.junit.Test
  
  class MediatorLiveData_metaTest {
      @get:Rule
      val instantTaskExecutorRule = InstantTaskExecutorRule()
  
      @Test
      fun mediatorLiveData_metaTest() {
          val sourceInt = MutableLiveData&lt;Int&gt;()
          val mediatedStr = MediatorLiveData&lt;String&gt;()
  
          mediatedStr.addSource(sourceInt) {
              mediatedStr.value = it.toString()
          }
  
          sourceInt.value = 123
  
          assertEquals("123", mediatedStr.value) // says mediatedStr.value is null
      }
  }
  </code></pre>