AsyncListUtil { public void refresh() { mMissingPositions.clear(); mBackgroundProxy.refresh(++mRequestedGeneration); } AsyncListUtil(Class<T> klass, int tileSize, DataCallback<T> dataCallback,
                         ViewCallback viewCallback); void onRangeChanged(); void refresh(); T getItem(int position); int getItemCount();  }
@Test public void testDataRefresh() throws InterruptedException { mViewCallback.expectDataSetChanged(40); mDataCallback.expectTiles(0, 10, 20); mAsyncListUtil.refresh(); mViewCallback.waitForDataSetChanged("increasing item count"); mDataCallback.waitForTiles("increasing item count"); mViewCallback.expectDataSetChanged(15); mDataCallback.expectTiles(0, 10); mAsyncListUtil.refresh(); mViewCallback.waitForDataSetChanged("decreasing item count"); mDataCallback.waitForTiles("decreasing item count"); }