@Test
public void testHistogramActionIntervalMinuteWithFilter() throws QueryStoreException, JsonProcessingException {

    HistogramRequest histogramRequest = new HistogramRequest();
    histogramRequest.setTable(TestUtils.TEST_TABLE_NAME);
    histogramRequest.setPeriod(Period.minutes);
    GreaterThanFilter greaterThanFilter = new GreaterThanFilter();
    greaterThanFilter.setField("battery");
    greaterThanFilter.setValue(48);
    LessThanFilter lessThanFilter = new LessThanFilter();
    lessThanFilter.setTemporal(true);
    lessThanFilter.setField("_timestamp");
    lessThanFilter.setValue(System.currentTimeMillis());
    histogramRequest.setFilters(Lists.<Filter>newArrayList(greaterThanFilter, lessThanFilter));
    HistogramResponse response = HistogramResponse.class.cast(queryExecutor.execute(histogramRequest));
    List<HistogramResponse.Count> counts = new ArrayList<HistogramResponse.Count>();
    counts.add(new HistogramResponse.Count(1397651100000L, 1));
    counts.add(new HistogramResponse.Count(1397658060000L, 2));
    counts.add(new HistogramResponse.Count(1397658180000L, 1));
    counts.add(new HistogramResponse.Count(1397958060000L, 1));
    counts.add(new HistogramResponse.Count(1398658200000L, 1));
    assertTrue(response.getCounts().equals(counts));
}