TimelineListAdapter extends BaseAdapter { public void refresh(Callback<TimelineResult<T>> cb) { delegate.refresh(cb); } 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 testConstructor() { listAdapter = new TestTimelineListAdapter<>(context, mockTimelineDelegate); verify(mockTimelineDelegate).refresh(null); }
@Test public void testRefresh() { listAdapter = new TestTimelineListAdapter<>(context, mockTimelineDelegate); final Callback<TimelineResult<TestItem>> mockCallback = mock(Callback.class); listAdapter.refresh(mockCallback); verify(mockTimelineDelegate).refresh(mockCallback); }