TimelineDelegate { public long getItemId(int position) { final Identifiable item = itemList.get(position); return item.getId(); } TimelineDelegate(Timeline<T> timeline);   TimelineDelegate(Timeline<T> timeline, DataSetObservable observable, List<T> items); void refresh(Callback<TimelineResult<T>> developerCb); void next(Callback<TimelineResult<T>> developerCb); void previous(); int getCount(); Timeline getTimeline(); T getItem(int position); long getItemId(int position); void setItemById(T item); void registerDataSetObserver(DataSetObserver observer); void unregisterDataSetObserver(DataSetObserver observer); void notifyDataSetChanged(); void notifyDataSetInvalidated();  }
@Test public void testGetItemId() { delegate = new TimelineDelegate<>(mockTimeline, null, testItems); assertEquals(TEST_ITEM_2.getId(), delegate.getItemId(0)); assertEquals(TEST_ITEM_1.getId(), delegate.getItemId(1)); }