How to write test for state of screen when set data. Activity has in recyclerView and load data from apis

Two UI unit tests; one that asserts the state of the screen when set up with all data present, and one that asserts the state of the screen when in an error state.