Validate your ArrayAdapter with Espresso test case
This tutorial is based on ArrayAdapter which returns custom object on getItem() function of the adapter. In this demo our custom object is as follows. (Note this things are in Recycler view or ArrayAdapter ) public static class HelloCustomList { private String label; private String subLabel; public HelloCustomList (String label, String subLabel) { this.label = label; this.subLabel = subLabel; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } public String getSubLabel() { ...