title: MutableLiveData is null in JUnitTest
body: <p>I want to write a unit test. Therefore I need MutableLiveData. I started with a very basic test for setup but I cannot instantiate a MutableLiveData object. I is always null when I run the test. Do I have to mock anything? Any suggestions? </p>
  
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class DefaultLiveDataTest {
  
      private static final int EXPECTED = 5;
  
      private final MutableLiveData&lt;Integer&gt; underTest = new MutableLiveData&lt;&gt;();
  
  
      @Test
      public void exampleTest() {
  
      underTest.setValue(EXPECTED); //underTest is Null
      assertEquals(underTest.getValue().intValue(), EXPECTED);
  
      }
  }
  
  java.lang.NullPointerException
  at android.arch.core.executor.DefaultTaskExecutor.isMainThread(DefaultTaskExecutor.java:58)
  at android.arch.core.executor.ArchTaskExecutor.isMainThread(ArchTaskExecutor.java:116)
  at android.arch.lifecycle.LiveData.assertMainThread(LiveData.java:434)
  at android.arch.lifecycle.LiveData.setValue(LiveData.java:279)
  at android.arch.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33)
  at com.mypackage.DefaultLiveDataTest.test_that_live_data_has_default_value(DefaultLiveDataTest.java:22)
  </code></pre>
  
  <p>build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 27
  defaultConfig {
      applicationId 'com.mypackage.title'
      minSdkVersion 16
      targetSdkVersion 27
      versionCode 1
      versionName '1.0'
      testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
  }
  
  testOptions {
      unitTests.returnDefaultValues = true
  }
  
  dependencies {
  implementation fileTree(dir: 'libs', include: ['*.jar'])
  implementation 'com.android.support:appcompat-v7:27.1.1'
  implementation 'com.android.support:design:27.1.1'
  implementation 'com.android.support.constraint:constraint-layout:1.0.2'
  implementation 'com.android.support:support-vector-drawable:27.1.1'
  implementation 'android.arch.lifecycle:extensions:1.1.1'
  implementation 'android.arch.lifecycle:viewmodel:1.1.1'
  implementation 'android.arch.lifecycle:livedata:1.1.1'
  
  annotationProcessor 'android.arch.lifecycle:compiler:1.1.1'
  testImplementation 'junit:junit:4.12'
  testImplementation 'org.mockito:mockito-core:1.10.19'
  androidTestImplementation 'com.android.support.test:runner:1.0.1'
  androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
  annotationProcessor 'org.androidannotations:androidannotations:4.4.0'
  implementation 'org.androidannotations:androidannotations-api:4.4.0'
  compileOnly 'org.projectlombok:lombok:1.16.20'
  annotationProcessor 'org.projectlombok:lombok:1.16.20'
  }
  </code></pre>