@Test
public void testNumHoursUntilNextFlushBloomFilter() {

	// use Wednesday 6 AM this week as start date
	Calendar wedAtSix = Calendar.getInstance();
	wedAtSix.set(Calendar.HOUR_OF_DAY, 6);
	wedAtSix.set(Calendar.DAY_OF_WEEK, 4);
	// Test Sunday, Monday Tuesday, Wednesday of next week @ 4 AM
	for (int dayIndex = 0; dayIndex < 3; dayIndex++) {
		int nthHour = dayIndex * 24 + 4;
		int secondsUntil = _esSchemaService.getNumSecondsUntilNthHourOfWeek(nthHour, wedAtSix);
		int floorHoursUntil = secondsUntil / 60 / 60;
		int expectedHours = (4 + dayIndex) * 24 - 2;
		assertTrue("hoursUntil should be between " + (expectedHours - 1) + " and " + expectedHours, expectedHours - 1 <= floorHoursUntil && floorHoursUntil <= expectedHours);
	}
	// Test Wednesday Thursday, Fri, Sat of this week @ 8 AM
	for (int dayIndex = 3; dayIndex < 7; dayIndex++) {
		int nthHour = dayIndex * 24 + 8;
		int secondsUntil = _esSchemaService.getNumSecondsUntilNthHourOfWeek(nthHour, wedAtSix);
		int floorHoursUntil = secondsUntil / 60 / 60;
		int expectedHours = (dayIndex - 3) * 24 + 2;
		assertTrue("hoursUntil should be between " + (expectedHours - 1) + " and " + expectedHours, expectedHours - 1 <= floorHoursUntil && floorHoursUntil <= expectedHours);
	}
}