Espresso, clicking on a item at position
<p>I'm trying to click on a item at a specific position in a grid view.</p>

<pre><code>onData(instanceOf(MyClass.class))
            .inAdapterView(withId(R.id.my_view))
            .atPosition(R.integer.my_id)
            .perform(click());
</code></pre>

<p>but I'm getting this <code>java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0</code></p>

<p>I'm queuing the responses using MockWebServer, even after the UI is on screen with all the list item, I'm getting this error, I'm not sure why.</p>

<p>Also, I want to get the content of the specific item.</p>