@Test
public void testSerializeDateRange() {

  Date startDate = newDate(1999, 3, 21, 14, 0, 0);
  Date endDate = newDate(1999, 3, 21, 14, 30, 10);
  String serializedStartDate = dateFormatUTC().format(startDate);
  String serializedEndDate = dateFormatUTC().format(endDate);
  String day = "[" + serializedStartDate + " TO " + serializedEndDate + "]";
  assertEquals(day, SolrUtils.serializeDateRange(some(startDate), some(endDate)));
  assertEquals("[* TO " + serializedEndDate + "]", SolrUtils.serializeDateRange(Option.<Date>none(), some(endDate)));
  assertEquals("[" + serializedStartDate + " TO *]", SolrUtils.serializeDateRange(some(startDate), Option.<Date>none()));
}