### Question:
QueryStateInfoResource { private QueryStateInfo getQueryStateInfo(BasicQueryInfo queryInfo) { Optional<ResourceGroupId> groupId = queryInfo.getResourceGroupId(); if (queryInfo.getState() == QUEUED) { return createQueuedQueryStateInfo( queryInfo, groupId, groupId.map(group -> resourceGroupManager.tryGetPathToRoot(group) .orElseThrow(() -> new IllegalStateException("Resource group not found: " + group)))); } return createQueryStateInfo(queryInfo, groupId); } @Inject  QueryStateInfoResource(
            DispatchManager dispatchManager,
            ResourceGroupManager<?> resourceGroupManager,
            AccessControl accessControl,
            GroupProvider groupProvider); @ResourceSecurity(AUTHENTICATED_USER) @GET @Produces(MediaType.APPLICATION_JSON) List<QueryStateInfo> getQueryStateInfos(@QueryParam("user") String user, @Context HttpServletRequest servletRequest, @Context HttpHeaders httpHeaders); @ResourceSecurity(AUTHENTICATED_USER) @GET @Path("{queryId}") @Produces(MediaType.APPLICATION_JSON) QueryStateInfo getQueryStateInfo(@PathParam("queryId") String queryId, @Context HttpServletRequest servletRequest, @Context HttpHeaders httpHeaders);  }### Answer:
@Test public void testGetQueryStateInfo() { QueryStateInfo info = client.execute( prepareGet() .setUri(server.resolve("/v1/queryState/" + queryResults.getId())) .setHeader(PRESTO_USER, "unknown") .build(), createJsonResponseHandler(jsonCodec(QueryStateInfo.class))); assertNotNull(info); }