title: Unresolved reference: testing
body: <p>I'm trying to write simple integration test in my current android project written totally in Kotlin.</p>
  
  <p>The problem is that the test doesn't even start and fails with the following error:</p>
  
  <pre><code>Error:(4, 36) Unresolved reference: testing
  Error:(18, 52) Unresolved reference: InstantTaskExecutorRule
  Error:Execution failed for task ':app:kaptGenerateStubsDebugAndroidTestKotlin'.
  &gt; Compilation error. See log for more details
  </code></pre>
  
  <p>I've tried googling around this problem but without success.</p>
  
  <p>Steps I already tried to folow:</p>
  
  <ol>
  <li>Check if the library that contains InstantTaskExecutorRule is installed and I can dive into this package (yes, I can)</li>
  <li>Check if my test is placed in a correct folder (yes, it's in the <code>androidTest</code>)</li>
  <li>Check if I launch my tests properly (probably, I'm launching them by right click package <code>pkgName (androidTest)</code> and then "Run tests in...")</li>
  </ol>
  
  <p>I've also tried to rename my source dirs to koltin from java, and set proper values to <code>sourceSets</code> but changed it back because of no success as well and considered it's not a reason.</p>
  
  <p><strong>Important notice</strong>: </p>
  
  <p>If I comment the line <code>import android.arch.core.executor.testing.InstantTaskExecutorRule</code> and all code, related to <code>InstantTaskExecutorRule</code> (meaning that the whole test logic will be empty) and place a simple <code>assert</code> for example, then everything works just fine.</p>
  
  <p>But I want to use this particular <code>InstantTaskExecutorRule</code> and would like to know what the problem actually is and how to solve it, or at least to know where should I look for and what.</p>
  
  <p>Here is my test code:</p>
  
  <pre><code>import android.arch.core.executor.testing.InstantTaskExecutorRule
  import android.arch.persistence.room.Room
  import android.support.test.InstrumentationRegistry
  import android.support.test.runner.AndroidJUnit4
  
  import org.junit.After
  import org.junit.Before
  import org.junit.Rule
  import org.junit.Test
  import org.junit.runner.RunWith
  import com.myapp.storage.base.AppDataBase
  
  
  @RunWith(AndroidJUnit4::class)
  class UserDaoTest{
      @JvmField @Rule val instantTaskExecutorRule = InstantTaskExecutorRule()
  
      private lateinit var db: AppDataBase
  
      @Before
      @Throws(Exception::class)
      fun setUp(){
          db = Room.inMemoryDatabaseBuilder(InstrumentationRegistry.getContext(), AppDataBase::class.java)
                  .allowMainThreadQueries()
                  .build()
      }
  
      @After
      fun closeDB(){
          db.close()
      }
  
      @Test
      fun getUsersWhenNoUserInserted(){
          db.userDao().allUsers()
                  .test().assertNoValues()
      }
  
  }
  </code></pre>