CollectionTimeline extends BaseTimeline implements Timeline<Tweet> { Call<TwitterCollection> createCollectionRequest(final Long minPosition, final Long maxPosition) { return twitterCore.getApiClient().getCollectionService() .collection(collectionIdentifier, maxItemsPerRequest, maxPosition, minPosition); } CollectionTimeline(TwitterCore twitterCore, Long collectionId, Integer maxItemsPerRequest); @Override void next(Long minPosition, Callback<TimelineResult<Tweet>> cb); @Override void previous(Long maxPosition, Callback<TimelineResult<Tweet>> cb);  }
@Test public void testCreateCollectionRequest() { final CollectionTimeline timeline = new CollectionTimeline(twitterCore, TEST_COLLECTION_ID, TEST_ITEMS_PER_REQUEST); timeline.createCollectionRequest(TEST_MIN_POSITION, TEST_MAX_POSITION); verify(twitterCore.getApiClient().getCollectionService()).collection( eq(CollectionTimeline.COLLECTION_PREFIX + TEST_COLLECTION_ID), eq(TEST_ITEMS_PER_REQUEST), eq(TEST_MAX_POSITION), eq(TEST_MIN_POSITION)); }