BasicTimelineFilter implements TimelineFilter { boolean containsMatchingMention(List<MentionEntity> mentions) { for (MentionEntity entity : mentions) { final String name = normalizeHandle(entity.screenName); if (handleConstraints.contains(name)) { 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 testContainsMatchingMention_withNoMatch() { final MentionEntity entity = new MentionEntity(0, "0", "Foo Bar", "FooBar", 0, 0); assertFalse(basicTimelineFilter.containsMatchingMention(Collections.singletonList(entity))); }
@Test public void testContainsMatchingMention_withMatch() { final MentionEntity entity = new MentionEntity(0, "0", "Eric Frohnhoefer", "EricFrohnhoefer", 0, 0); assertTrue(basicTimelineFilter.containsMatchingMention(Collections.singletonList(entity))); }