title: Is it possible to do integration tests with Robolectric?
body: <p>I have <code>MainActivity</code> and <code>SubActivity</code>.</p>
  
  <p><code>MainActivity</code> has a button triggering a <code>startActivityForResult</code> calling <code>SubActivity</code>.</p>
  
  <p>The <code>SubActivy</code> has the responsibility to add a record to a certain repository so that when it calls <code>finish</code>, the <code>MainActivty</code>, in the method onActivityResult, has to call the <code>notifyDataSetChanged</code> on the adapter:</p>
  
  <pre><code>    @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
              if(resultCode == RESULT_OK &amp;&amp; requestCode == 1) {
                      adapter.notifyDataSetChanged();
              }
      }
  </code></pre>
  
  <p>Now, is there a way to test this <em>come and go</em> with Robolectric? Right now I'm able to test the intent called with a click from <code>MainActivity</code> to <code>SubActivity</code> (using Shadow objects), but I can't see no way to trigger the <code>finish</code> on <code>SubActivity</code> (with the new element added to the repository) so I can check that the adapter is showing the new element on <code>MainActivity</code></p>
  
  <p>I'm new to Roboelectric so I don't if what I want to test is beyond what this framework is about. Should I use Mockito? </p>