long nextToken = token + responsePages.size();
tokenByLocation.put(location, nextToken);
DynamicSliceOutput sliceOutput = new DynamicSliceOutput(64);
PagesSerde.writePages(createTestingBlockEncodingManager(), sliceOutput, responsePages);
byte[] bytes = sliceOutput.slice().getBytes();
return new TestingResponse(HttpStatus.OK,
ImmutableListMultimap.of(
CONTENT_TYPE, PRESTO_PAGES,
PRESTO_PAGE_TOKEN, String.valueOf(token),
PRESTO_PAGE_NEXT_TOKEN, String.valueOf(nextToken)