assertThat(result.getNumberOfElements(), is(equalTo(4)));
HistogramResult facet = (HistogramResult) result.getFacet(facetName);
assertThat(facet.getIntervalUnit().size(), is(equalTo(3)));
IntervalUnit unit = facet.getIntervalUnit().get(0);
assertThat(unit.getKey(), is(dateFormatter.parse("2013-10-18 16:00").getTime()));
assertThat(unit.getCount(), is(1L));
unit = facet.getIntervalUnit().get(1);
assertThat(unit.getKey(), is(dateFormatter.parse("2013-10-18 17:00").getTime()));
assertThat(unit.getCount(), is(2L));
unit = facet.getIntervalUnit().get(2);
assertThat(unit.getKey(), is(dateFormatter.parse("2013-10-18 18:00").getTime()));
assertThat(unit.getCount(), is(1L));
}