Espresso: Click on last item in AdapterView

In Espresso is quite easy to tap on the first element of an AdapterView, such as a ListView. This can be easily done calling DataIteraction.atPosition(0). Clicking on the last item though, is much more complicated. The last position is unknown to Espresso and extracting it stringing together a findViewById() and AdapterView.getCount() seems to defeat the purpose of using Espresso altogether. Continue reading