title: How can I Unit test Paging 3(PagingSource)?
body: <p>Google recently announced the new Paging 3 library, Kotlin-first library, Support for coroutines and Flow...etc. </p>
  
  <p>I played with the <a href="https://codelabs.developers.google.com/codelabs/android-paging/index.html?index=..%2F..index#0" rel="noreferrer">codelab</a> they provide but it seems there's not any support yet for testing, I also checked <a href="https://developer.android.com/topic/libraries/architecture/paging/v3-overview" rel="noreferrer">documentation</a>. They didn't mention anything about testing, So For Example I wanted to unit test this PagingSource:</p>
  
  <pre><code> class GithubPagingSource(private val service: GithubService,
                       private val query: String) : PagingSource&lt;Int, Repo&gt;() {
  
  override suspend fun load(params: LoadParams&lt;Int&gt;): LoadResult&lt;Int, Repo&gt; {
      //params.key is null in loading first page in that case we would use constant GITHUB_STARTING_PAGE_INDEX
      val position = params.key ?: GITHUB_STARTING_PAGE_INDEX
      val apiQuery = query + IN_QUALIFIER
      return try {
          val response = service.searchRepos(apiQuery, position, params.loadSize)
          val data = response.items
          LoadResult.Page(
                          data,
                          if (position == GITHUB_STARTING_PAGE_INDEX) null else position - 1,
                          if (data.isEmpty()) null else position + 1)
      }catch (IOEx: IOException){
          Log.d("GithubPagingSource", "Failed to load pages, IO Exception: ${IOEx.message}")
          LoadResult.Error(IOEx)
      }catch (httpEx: HttpException){
          Log.d("GithubPagingSource", "Failed to load pages, http Exception code: ${httpEx.code()}")
          LoadResult.Error(httpEx)
      }
    }
  }  
  </code></pre>
  
  <p>So, How can I test this, is anyone can help me??</p>