SearchTimeline extends BaseTimeline implements Timeline<Tweet> { Call<Search> createSearchRequest(final Long sinceId, final Long maxId) { return twitterCore.getApiClient().getSearchService().tweets(query, geocode, languageCode, null, resultType, maxItemsPerRequest, untilDate, sinceId, maxId, true); } SearchTimeline(TwitterCore twitterCore, String query, Geocode geocode, String resultType,
                   String languageCode, Integer maxItemsPerRequest, String untilDate); @Override void next(Long sinceId, Callback<TimelineResult<Tweet>> cb); @Override void previous(Long maxId, Callback<TimelineResult<Tweet>> cb);  }
@Test public void testCreateSearchRequest() { final SearchTimeline timeline = spy(new SearchTimeline(twitterCore, TEST_QUERY, null, TEST_RESULT_TYPE, TEST_LANG, TEST_ITEMS_PER_REQUEST, TEST_UNTIL_DATE)); timeline.createSearchRequest(TEST_SINCE_ID, TEST_MAX_ID); verify(twitterCore.getApiClient().getSearchService()) .tweets(eq(TEST_QUERY + SearchTimeline.FILTER_RETWEETS), isNull(Geocode.class), eq(TEST_LANG), isNull(String.class), eq(TEST_RESULT_TYPE), eq(TEST_ITEMS_PER_REQUEST), eq(TEST_UNTIL_DATE), eq(TEST_SINCE_ID), eq(TEST_MAX_ID), eq(true)); }