private QueryStateInfo getQueryStateInfo(
            BasicQueryInfo queryInfo,
            boolean includeAllQueryProgressStats,
            boolean excludeResourceGroupPathInfo,
            OptionalInt queryTextSizeLimit)
    {
        Optional<ResourceGroupId> groupId = queryInfo.getResourceGroupId();
        return createQueryStateInfo(
                queryInfo,
                queryInfo.getState() == QUEUED && !excludeResourceGroupPathInfo ? groupId.map(resourceGroupManager::getPathToRoot) : Optional.empty(),
                includeAllQueryProgressStats,
                queryTextSizeLimit);
    }
@Test
    public void testGetQueryStateInfo()
    {
        QueryStateInfo info = client.execute(
                prepareGet().setUri(server.resolve("/v1/queryState/" + queryResults.getId())).build(),
                createJsonResponseHandler(jsonCodec(QueryStateInfo.class)));

        assertNotNull(info);
    }