title: Android: Writing test cases for Fragments
body: <p>In my previous projects I've done most of the work through Activities and used ActivityInstrumentationTestCase2 as per the document:<br>
  <a href="http://developer.android.com/tools/testing/activity_testing.html">http://developer.android.com/tools/testing/activity_testing.html</a>
  <br>
  I have an idea how to work with Activity Test cases; but when it comes to Fragment ,I don't have much idea nor found much documents related to that.
  So how to write test cases when I have several fragments with one or two actvities?
  Any example code or sample would be more helpful.</p>