/** testLoadFlightDepartTime */ public void testLoadFlightDepartTime() throws Exception { Histogram<String> histogram = SEATSHistogramUtil.loadHistogram( SEATSConstants.HISTOGRAM_FLIGHTS_PER_DEPART_TIMES, AIRLINE_DATA_DIR, true); assertFalse(histogram.values().isEmpty()); // We expect the times to be in 15 minute increments, therefore there should // be exactly 96 entries in the histogram assertEquals(94, histogram.values().size()); // Make sure the values are formatted correctly Pattern p = Pattern.compile("[\\d]{2,2}:[\\d]{2,2}"); for (Object value : histogram.values()) { assert (p.matcher(value.toString()).matches()) : "Invalid entry '" + value + "'"; } // FOR // System.err.println("Values=" + histogram.getValueCount() + "\n" + histogram); }