BasicTimelineFilter implements TimelineFilter { boolean containsMatchingUrl(List<UrlEntity> urls) { for (UrlEntity entity : urls) { final String url = normalizeUrl(entity.expandedUrl); if (urlConstraints.contains(url)) { 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 testContainsMatchingUrl_withNoMatch() { final UrlEntity entity = new UrlEntity("foobar.com", "http: assertFalse(basicTimelineFilter.containsMatchingUrl(Collections.singletonList(entity))); }
@Test public void testContainsMatchingUrl_withMatch() { final UrlEntity entity = new UrlEntity("Cookiesareawesome.com", "http: assertTrue(basicTimelineFilter.containsMatchingUrl(Collections.singletonList(entity))); }