title: How to use robolectric to test started intent with extra data
body: <p>In an activity, I started a new Intent with some random extra data:</p>
  
  <pre><code>Intent newIntent = new Intent(this, UserActivity.class);
  newIntent.putExtra("key", generateRandomKey());
  startActivity(newIntent);
  </code></pre>
  
  <p>I tested it like this:</p>
  
  <pre><code>Intent intent = new Intent(myactivity, UserActivity.class);
  Assert.assertThat(activity, new StartedMatcher(intent));
  </code></pre>
  
  <p>It's failed because the <code>intent</code> in my test code has not extra data <code>key</code>.</p>
  
  <p>Since the <code>key</code> is random, it's hard to provide a same key. So I just want to test if the target class of the intent is <code>UserActivity</code>, but found no way to do it.</p>
  
  <p>Is there a solution?</p>