### Question:
WebPageDateEvaluator { public static RatedDate<ExtractedDate> getBestDate(Document document, PageDateType type) { Validate.notNull(document, "document must not be null"); Validate.notNull(type, "type must not be null"); List<RatedDate<ExtractedDate>> dates = getDates(document, type); if (dates.size() > 0) { RatedDate<ExtractedDate> bestRatedDate = dates.get(0); return bestRatedDate; } return null; } private  WebPageDateEvaluator(); static List<RatedDate<ExtractedDate>> getDates(Document document, PageDateType type); static RatedDate<ExtractedDate> getBestDate(Document document, PageDateType type); static ExtractedDate getBestPubDateHtml5(Document document); static RatedDate<ExtractedDate> getBestDate(String url, PageDateType type); @SuppressWarnings("unchecked") static List<RatedDate<ExtractedDate>> rate(List<? extends ExtractedDate> extractedDates, PageDateType type);  }### Answer:
@Test public void testGetBestRatedDate() throws FileNotFoundException, ParserException { File file = ResourceHelper.getResourceFile("/webPages/dateExtraction/zeit2.htm"); Document document = htmlParser.parse(file); RatedDate<ExtractedDate> date = WebPageDateEvaluator.getBestDate(document, PageDateType.PUBLISH); file = ResourceHelper.getResourceFile("/webPages/dateExtraction/zeit1.htm"); document = htmlParser.parse(file); date = WebPageDateEvaluator.getBestDate(document, PageDateType.PUBLISH); assertEquals("2010-08-22", date.getDate().getNormalizedDateString()); }