BasicTimelineFilter implements TimelineFilter { @Override public List<Tweet> filter(List<Tweet> tweets) { final List<Tweet> filteredTweets = new ArrayList<>(); for (int idx = 0; idx < tweets.size(); idx++) { final Tweet tweet = tweets.get(idx); if (!shouldFilterTweet(tweet)) { filteredTweets.add(tweet); } } return Collections.unmodifiableList(filteredTweets); } BasicTimelineFilter(FilterValues filterValues);  BasicTimelineFilter(FilterValues filterValues, Locale locale); @Override List<Tweet> filter(List<Tweet> tweets); @Override int totalFilters();  }
@Test public void testFilter() { final List<Tweet> tweets = new ArrayList<>(); tweets.add(TEST_TWEET_1); tweets.add(TEST_TWEET_2); tweets.add(TEST_TWEET_3); final List<Tweet> filteredTweets = basicTimelineFilter.filter(tweets); assertNotNull(filteredTweets); assertEquals(2, filteredTweets.size()); assertEquals(TEST_TWEET_2, filteredTweets.get(0)); assertEquals(TEST_TWEET_3, filteredTweets.get(0)); }