@Test
public void testSerializeDateRange() {

  Calendar d = Calendar.getInstance();
  d.set(Calendar.MILLISECOND, 0);
  d.set(Calendar.SECOND, 0);
  d.set(Calendar.MINUTE, 0);
  d.set(Calendar.HOUR_OF_DAY, 0);
  Date startDate = d.getTime();
  d.add(Calendar.DAY_OF_MONTH, 2);
  d.set(Calendar.HOUR_OF_DAY, 5);
  d.set(Calendar.MINUTE, 59);
  Date endDate = d.getTime();
  String serializedStartDate = df.format(startDate) + "T00:00:00Z";
  String serializedEndDate = df.format(endDate) + "T05:59:00Z";
  String day = "[" + serializedStartDate + " TO " + serializedEndDate + "]";
  assertEquals(day, IndexUtils.serializeDateRange(startDate, endDate));
}