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

    Query query = new Query();
    query.setTable(TestUtils.TEST_TABLE_NAME);
    query.setLimit(3);
    ResultSort resultSort = new ResultSort();
    resultSort.setOrder(ResultSort.Order.desc);
    resultSort.setField("_timestamp");
    query.setSort(resultSort);
    BetweenFilter betweenFilter = new BetweenFilter();
    betweenFilter.setField("battery");
    betweenFilter.setFrom(47);
    betweenFilter.setTo(75);
    query.setFilters(Lists.<Filter>newArrayList(betweenFilter));
    List<Document> documents = new ArrayList<Document>();
    documents.add(
            TestUtils.getDocument("Y", 1397658117003L, new Object[]{"os", "android", "device", "nexus", "battery", 48}, getMapper()));
    documents.add(
            TestUtils.getDocument("X", 1397658117002L, new Object[]{"os", "android", "device", "nexus", "battery", 74}, getMapper()));
    QueryResponse actualResponse = QueryResponse.class.cast(getQueryExecutor().execute(query));
    compare(documents, actualResponse.getDocuments());
}