BasicTimelineFilter implements TimelineFilter { boolean containsMatchingHashtag(List<HashtagEntity> hashtags) { for (HashtagEntity entity : hashtags) { if (hashTagConstraints.contains(entity.text)) { return true; } } return false; } BasicTimelineFilter(FilterValues filterValues);  BasicTimelineFilter(FilterValues filterValues, Locale locale); @Override List<Tweet> filter(List<Tweet> tweets); @Override int totalFilters();  }
@Test public void testContainsMatchingHashtag_withNoMatch() { final HashtagEntity entity = new HashtagEntity("foobar", 0, 0); assertFalse(basicTimelineFilter.containsMatchingHashtag(Collections.singletonList(entity))); }
@Test public void testContainsMatchingHashtag_withMatch() { final HashtagEntity entity = new HashtagEntity("cookies", 0, 0); assertTrue(basicTimelineFilter.containsMatchingHashtag(Collections.singletonList(entity))); }