title: Android espresso and account picker
body: <p>I am having trouble making the instrumentation test using the Espresso.
  I have an activity where account picker is popup-ed when app is started (main activity). 
  If customer clicks on cancel (in dialog), picker is popup up again; If user clicks on add, the   result is picked up on activity result.</p>
  
  <p>I dont know how to create a simple test with espresso which will include that picker.
  When I create the Instrumentation test with the MainActivity, I got this message: 
  No activities in stage RESUMED...</p>
  
  <pre><code>public class MainActivityTest extends ActivityInstrumentationTestCase2&lt;MainActivity&gt;{
      MainActivity myActivity;
      public MainActivityTest(){
          super(MainActivity.class);
      }
  
      @Override
      protected void setUp() throws Exception {
          super.setUp();
          getActivity();
      }
  
      public void testAccountPicker(){
          onView(withText("Choose an account")).check(matches(isDisplayed()));
      }
  }
  </code></pre>
  
  <p>Does anybody had similar problem?</p>
  
  <p>Thanx for your answers in advance.</p>