TimelineListAdapter extends BaseAdapter { @Override public void notifyDataSetInvalidated() { delegate.notifyDataSetInvalidated(); } TimelineListAdapter(Context context, Timeline<T> timeline);   TimelineListAdapter(Context context, TimelineDelegate<T> delegate); void refresh(Callback<TimelineResult<T>> cb); @Override int getCount(); @Override T getItem(int position); @Override long getItemId(int position); @Override void registerDataSetObserver(DataSetObserver observer); @Override void unregisterDataSetObserver(DataSetObserver observer); @Override void notifyDataSetChanged(); @Override void notifyDataSetInvalidated();  }
@Test public void testNotifyDataSetInvalidated() { listAdapter = new TestTimelineListAdapter<>(context, mockTimelineDelegate); listAdapter.notifyDataSetInvalidated(); verify(mockTimelineDelegate, times(1)).notifyDataSetInvalidated(); }