@Test
public void testStatsActionWithMultiLevelNesting() throws FoxtrotException {

    StatsRequest request = new StatsRequest();
    request.setTable(TestUtils.TEST_TABLE_NAME);
    request.setField("battery");
    request.setNesting(Lists.newArrayList("os", "version"));
    StatsResponse statsResponse = StatsResponse.class.cast(getQueryExecutor().execute(request));
    assertNotNull(statsResponse);
    assertNotNull(statsResponse.getResult());
    assertEquals(3, statsResponse.getBuckets()
            .size());
    for(BucketResponse bucketResponse : statsResponse.getBuckets()) {
        assertNull(bucketResponse.getResult());
        assertNotNull(bucketResponse.getBuckets());
    }
}