I am using Robolectric to test my Application. In my app I want to check the listview is there any items in that view. And test the onClickItem from the listview. The listview items is dynamic from server. Every time the activity is started it will request from server. But, Robolectric didn't wait the response, so the adapter on the listview still Null. I am using Robolectric to test my Application.