title: Toast not showing in espresso test
body: <p>I wanted to test a Toast message using Espresso, but when I am calling the method to show toast, the toast is not showing.
  It shows when I run the app normally, but when I run the test, no toast shows up.<br/></p>
  
  <pre><code>fun Context.showMessage(@StringRes message:Int){
      Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
  }
  </code></pre>
  
  <p>I am calling <code>showMessage()</code> in the TestFragment's showMessage method which is called in FragmentScenario's <code>onFragment</code></p>
  
  <pre><code>override fun showMessage(message: Int) {
      context?.showMessage(message)
  }
  </code></pre>
  
  <pre><code>val scenario = launchFragmentInContainer&lt;TestFragment&gt;()
  scenario.onFragment {
       it.showMessage(R.string.test_string)
       onView(withText(it.context.getString(R.string.test_string))
            .inRoot(ToastMatcher())
            .check(matches(isDisplayed()))
  }
  </code></pre>
  
  <p>The test case is just stuck at</p>
  
  <pre><code>check(matches(isDisplayed()))
  </code></pre>
  
  <p>and I guess its because there is no toast displayed.</p>