title: Android: Generate a Mock Intent and return some intent-data from it
body: <p>I am using <a href="http://developer.android.com/reference/android/test/ActivityInstrumentationTestCase2.html" rel="noreferrer">ActivityInstrumentationTestCase2</a> for the unit testing of my application. I have a case where user clicks on a button of Activity 'A' and which in turns open a new Activity 'B' where user will do some work and finally some data is returned to Activity 'A' via setResult(RESULT_OK, intent);</p>
  
  <p>Now, i want to test this via jUnit and want to Mock this workflow so that no user interaction is required. Can someone help me with this.</p>
  
  <p>PS: i dont want to use Robotium for this..i just want to do it via plain ActivityInstrumentationTestCase2 and some Mocking framework.</p>