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

    Query query = new Query();
    query.setTable(TestUtils.TEST_TABLE_NAME);
    query.setLimit(100);
    ResultSort resultSort = new ResultSort();
    resultSort.setOrder(ResultSort.Order.desc);
    resultSort.setField("_timestamp");
    query.setSort(resultSort);
    NotInFilter notInFilter = new NotInFilter();
    notInFilter.setValues(Lists.newArrayList("nexus", "galaxy"));
    notInFilter.setField("device");
    query.setFilters(Lists.<Filter>newArrayList(notInFilter));
    List<Document> documents = new ArrayList<Document>();
    documents.add(TestUtils.getDocument("E", 1397658118004L, new Object[]{"os", "ios", "version", 2, "device", "ipad"}, getMapper()));
    documents.add(TestUtils.getDocument("D", 1397658118003L, new Object[]{"os", "ios", "version", 1, "device", "iphone"}, getMapper()));
    QueryResponse actualResponse = QueryResponse.class.cast(getQueryExecutor().execute(query));
    compare(documents, actualResponse.getDocuments());
}