title: Can't get the activity under test in an Android Espresso test
body: <p>In our Espresso tests, we need to customize the launch intent to pass custom extras and so on. Therefore, we set the <code>launchActivity</code> flag to <code>false</code>:</p>
  
  <pre><code>@Rule
  public final ActivityTestRule&lt;CreateQuoteActivity&gt; mActivityRule = new ActivityTestRule&lt;&gt;(
          CreateQuoteActivity.class, true, false
  );
  </code></pre>
  
  <p>Now, I want to get a reference to the activity under test. If that flag was <code>true</code>, I would use <code>mActivityRule.getActivity()</code>. However, now <code>mActivityRule.getActivity()</code> returns <code>null</code>.</p>
  
  <p>How can I get a reference to the activity?</p>