### Question:
DateExtractionHelper { public static <T extends ExtractedDate> List<T> filter(List<? extends ExtractedDate> dates, Class<T> filter) { return CollectionHelper.filter(dates, filter, new ArrayList<T>()); } private  DateExtractionHelper(); static List<T> filter(List<? extends ExtractedDate> dates, Class<T> filter); static List<T> filterByRange(List<T> dates); static List<T> filterFullDate(List<T> dates); static List<List<T>> cluster(List<T> dates, DateExactness compareDepth); static int countDates(ExtractedDate date, List<? extends ExtractedDate> dates, DateExactness exactness); static List<E> getRatedDates(List<RatedDate<E>> dates, double rate); static List<D> filterExactest(List<D> dates); static double getHighestRate(List<? extends RatedDate<?>> ratedDates); static boolean isDateInRange(ExtractedDate date); static List<RatedDate<T>> setRate(List<T> dates, double rate);  }### Answer:
@Test public void testFilter() throws FileNotFoundException { List<ExtractedDate> dates = new ArrayList<ExtractedDate>(); ExtractedDate now = new ExtractedDateImpl(); dates.add(now); dates.add(new ContentDate(now)); dates.add(new UrlDate(now, "http: dates.add(new ContentDate(now)); dates.add(new ContentDate(now)); dates.add(new ArchiveDate(now)); dates.add(new StructureDate(now)); assertEquals(7, dates.size()); assertEquals(3, DateExtractionHelper.filter(dates, ContentDate.class).size()); assertEquals(1, DateExtractionHelper.filter(dates, ArchiveDate.class).size()); assertEquals(4, DateExtractionHelper.filter(dates, KeywordDate.class).size()); assertEquals(7, DateExtractionHelper.filter(dates, ExtractedDate.class).size()); }