title: Add intent extras in compose UI test
body: <p>I want to UI test an Activity that uses <a href="https://developer.android.com/jetpack/compose" rel="noreferrer">Jetpack Compose</a>. The <a href="https://developer.android.com/jetpack/compose/testing" rel="noreferrer">docs</a> provide some information on how to test such a screen with two variants:</p>
  <pre><code> @get:Rule val composeTestRule = createComposeRule()
  </code></pre>
  <p>if I don't need the activity itself to run and want to test just my composables or</p>
  <pre><code> @get:Rule val composeTestRule = createAndroidComposeRule&lt;MyActivity&gt;()
  </code></pre>
  <p>if I do need the activity.</p>
  <p><strong>In the second case, how can I pass an Intent with Extras to the activity?</strong></p>
  <p>I've tried:</p>
  <pre><code>@Before
  fun setUp() {
      composeTestRule.activity.intent = Intent().apply {
          putExtra(
              &quot;someKey&quot;,
              123
          )
      }
  }
  </code></pre>
  <p>but the intent extras are still null in the activity.</p>