question: private void checkPostsDisplayOnRecyclerView ( List < Post > postsToCheck , int position ) { int columnCount = 5 ; int size = postsToCheck . size ( ) + position ; int pos = 0 ; for ( int i = position ; i < size ; i ++ ) { checkItemAtPosition ( i , postsToCheck . get ( pos ) ) ; if ( ( ( i + 1 ) % columnCount ) == 0 ) { int nextRowStart = i + columnCount ; int nextRowEnd = nextRowStart - columnCount + 1 ; for ( int n = nextRowStart ; n >= nextRowEnd ; n -- ) { checkItemAtPosition ( n , postsToCheck . get ( n - position ) ) ; } i = i + columnCount ; } pos ++ ; } }
target:  This method checks that the given list of posts display within the VerticalGridView. At the time of writing this, RecyclerViewActions is really buggy with grid based recycler views - so this method traverses through the rows of the grid (starting at left-to-right, then right-to-left and vice versa). This isn't ideal, but currently proper testing doesn't seem supported.