@Test
public void testMultiTimeQuery() throws FoxtrotException, JsonProcessingException {

    Query query = new Query();
    query.setTable(TestUtils.TEST_TABLE_NAME);
    ResultSort resultSort = new ResultSort();
    resultSort.setOrder(ResultSort.Order.asc);
    resultSort.setField("_timestamp");
    query.setSort(resultSort);
    BetweenFilter betweenFilter = new BetweenFilter("_timestamp", 1397658117000L, 1397658118005L, false);
    query.setFilters(Arrays.asList(betweenFilter));
    Duration duration = Duration.days(1);
    MultiTimeQueryRequest multiTimeQueryRequest = new MultiTimeQueryRequest(1, duration, query);
    ActionResponse actionResponse = getQueryExecutor().execute(multiTimeQueryRequest);
    MultiTimeQueryResponse multiTimeQueryResponse = null;
    if(actionResponse instanceof MultiTimeQueryResponse) {
        multiTimeQueryResponse = (MultiTimeQueryResponse)actionResponse;
    }
    assertNotNull(multiTimeQueryResponse);
    QueryResponse queryResponse = (QueryResponse)multiTimeQueryResponse.getResponses()
            .get("1397658117000");
    assertEquals(9, queryResponse.getTotalHits());
}