@Test
public void testGetResponse() throws Exception {

    GroupRequest groupRequest = new GroupRequest();
    groupRequest.setTable(TestUtils.TEST_TABLE_NAME);
    groupRequest.setNesting(Arrays.asList("os", "device", "version"));
    Map<String, Object> expectedResponse = new LinkedHashMap<String, Object>();
    final Map<String, Object> nexusResponse = new LinkedHashMap<String, Object>() {{
        put("1", 2);
        put("2", 2);
        put("3", 1);
    }};
    final Map<String, Object> galaxyResponse = new LinkedHashMap<String, Object>() {{
        put("2", 1);
        put("3", 1);
    }};
    expectedResponse.put("android", new LinkedHashMap<String, Object>() {{
        put("nexus", nexusResponse);
        put("galaxy", galaxyResponse);
    }});
    final Map<String, Object> nexusResponse2 = new LinkedHashMap<String, Object>() {{
        put("2", 1);
    }};
    final Map<String, Object> iPadResponse = new LinkedHashMap<String, Object>() {{
        put("2", 2);
    }};
    final Map<String, Object> iPhoneResponse = new LinkedHashMap<String, Object>() {{
        put("1", 1);
    }};
    expectedResponse.put("ios", new LinkedHashMap<String, Object>() {{
        put("nexus", nexusResponse2);
        put("ipad", iPadResponse);
        put("iphone", iPhoneResponse);
    }});
    AsyncDataToken dataToken = getQueryExecutor().executeAsync(groupRequest);
    await().pollDelay(1000, TimeUnit.MILLISECONDS).until(() -> true);
    GroupResponse groupResponse = resources.client()
            .target("/v1/async/" + dataToken.getAction() + "/" + dataToken.getKey())
            .request()
            .get(GroupResponse.class);
    assertEquals(expectedResponse, groupResponse.getResult());
}