title: Test if when a Button is clicked the correct activity is lauched
body: <p>I'm writing a test for an activity that have a few buttons,
  each one of than starts a new Activity, </p>
  
  <p>How can I know if the button is starting the correct activity?</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>public class MainActivityTest extends ActivityUnitTestCase&lt;MainActivity&gt; {
  
      private Intent mMainIntent;
  
  
      public MainActivityTest() {
          super(MainActivity.class);
      }
  
  
      @Override
      protected void setUp() throws Exception {
          super.setUp();
          mMainIntent = new Intent(Intent.ACTION_MAIN);
      }
  
      @MediumTest
      public void testButtonActivityA () {
          MainActivity activity = startActivity(mMainIntent, null, null);
          Button buttonActivityA = (Button) activity.findViewById(com.project.R.id.button_activity_a);
          buttonVoice.performClick();
          Intent i = getStartedActivityIntent();
          assertNotNull(i);
          assertTrue(isFinishCalled());
      }
  }
  </code></pre>
  
  <p>PS: the 'isFinishedCalled()' is failing, how can this be if I raise a new fullscreen Activity?
  Thanks,</p>