title: testing Intent in android
body: <p>I have an android app. When the user clicks button A and intent is fired like this android-presudocode :)</p>
  
  <pre><code>//inside FirstActivity
  @Override
  public void onClick(View view) {
      startActivity(new Intent(this, AnotherActivity.class));
  }
  </code></pre>
  
  <p>So if I'm not mistaken, the <code>onResume</code> method in <code>AnotherActivity</code> should be called, right? </p>
  
  <p>I use <code>ActivityInstrumentationTestCase2&lt;FirstActivity&gt;</code> to test my activity but I'm unable to instantiate <code>AnotherActivity</code>. </p>
  
  <p>So the question is, how can I test this: 'When a button is pressed, the correct activity is resumed and the correct extras are passed to the intent'. </p>