title: Testing viewpager with Espresso
body: <p>I have a viewpager and I want to check for an imageview in it. I have used following code but its not working.</p>
  
  <blockquote>
    <p>onView(allOf(withId(R.id.img_flag), hasSibling(withText("some
    text"))));</p>
  </blockquote>
  
  <ul>
  <li>this one always returns true</li>
  </ul>
  
  <blockquote>
    <p>onView(withId(R.id.img_flag)).check(doesNotExist());</p>
  </blockquote>
  
  <ul>
  <li>this one throws AmbiguousViewMatcherException</li>
  </ul>