@Test
 public void testGetCount() {
   delegate = new TimelineDelegate<>(mockTimeline);
   assertEquals(0, delegate.getCount());
   delegate = new TimelineDelegate<>(mockTimeline, null, testItems);
   assertEquals(testItems.size(), delegate.getCount());
 }
 @Test
 public void testGetNonLastItem_doesNotLoadPrevious() {
   final Timeline<TestItem> fakeTimeline =
       new FakeItemTimeline(NUM_ITEMS, ANY_POSITION, ANY_POSITION);
   delegate = new TimelineDelegate<>(fakeTimeline, mockObservable, null);
   delegate.refresh(null);
   // refresh loads latest items (notifyChange)
   verify(mockObservable).notifyChanged();
   assertEquals(NUM_ITEMS, delegate.getCount());
   delegate.getItem(1);
   // assert no items added and notifyChanged is not called again
   assertEquals(NUM_ITEMS, delegate.getCount());
   verify(mockObservable, times(1)).notifyChanged();
 }
 @Test
 public void testPrevious_addsItems() {
   final Timeline<TestItem> fakeTimeline =
       new FakeItemTimeline(NUM_ITEMS, ANY_POSITION, ANY_POSITION);
   delegate = new TimelineDelegate<>(fakeTimeline, mockObservable, null);
   delegate.refresh(null);
   // refresh loads latest items (notifyChange)
   delegate.previous();
   // assert items are added and notifyChanges is called again
   assertEquals(2 * NUM_ITEMS, delegate.getCount());
   verify(mockObservable, times(2)).notifyChanged();
 }
 @Test
 public void testPrevious_doesNotAddItemsAtEndOfTimeline() {
   // when a Timeline successfully returns an empty set of items, its end has been reached
   LinkedList<TestItem> initialItems = new LinkedList<>();
   final int INITIAL_COUNT = 5;
   initialItems = TestItem.populateList(initialItems, INITIAL_COUNT);
   final Timeline<TestItem> fakeEndTimeline =
       new FakeItemTimeline(ZERO_ITEMS, ANY_POSITION, ANY_POSITION);
   delegate = new TimelineDelegate<>(fakeEndTimeline, mockObservable, initialItems);
   delegate.previous();
   // assert no items are added and notifyChanged is not called
   assertEquals(INITIAL_COUNT, delegate.getCount());
   verifyZeroInteractions(mockObservable);
 }