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

    DistinctRequest distinctRequest = new DistinctRequest();
    distinctRequest.setTable(TestUtils.TEST_TABLE_NAME);
    List<ResultSort> resultSorts = new ArrayList<ResultSort>();
    ResultSort resultSort = new ResultSort();
    resultSort.setField("version");
    resultSort.setOrder(ResultSort.Order.asc);
    resultSorts.add(resultSort);
    resultSort = new ResultSort();
    resultSort.setField("os");
    resultSort.setOrder(ResultSort.Order.desc);
    resultSorts.add(resultSort);
    distinctRequest.setNesting(resultSorts);
    DistinctResponse expectedResponse = new DistinctResponse();
    expectedResponse.setHeaders(Arrays.asList("version", "os"));
    List<List<String>> listResponse = new ArrayList<List<String>>();
    listResponse.add(Arrays.asList("1", "ios"));
    listResponse.add(Arrays.asList("1", "android"));
    listResponse.add(Arrays.asList("2", "ios"));
    listResponse.add(Arrays.asList("3", "android"));
    expectedResponse.setResult(listResponse);
    DistinctResponse distinctResponse = DistinctResponse.class.cast(getQueryExecutor().execute(distinctRequest));
    assertNotNull(distinctResponse);
}