@Override
  public void close() {
    if (_executionFuture != null) {
      _executionFuture.cancel(true);
    }
  }
@Test
  public void shouldHandleMultipleRequests() {
    // Given:
    QueryContext queryContext = QueryContextConverterUtils.getQueryContext("SELECT strCol, intCol FROM tbl");
    DataSchema schema = new DataSchema(new String[]{"strCol", "intCol"},
        new DataSchema.ColumnDataType[]{DataSchema.ColumnDataType.STRING, DataSchema.ColumnDataType.INT});
    List<BaseResultsBlock> dataBlocks = Arrays.asList(
        new SelectionResultsBlock(schema, Arrays.asList(new Object[]{"foo", 1}, new Object[]{"", 2}), queryContext),
        new SelectionResultsBlock(schema, Arrays.asList(new Object[]{"bar", 3}, new Object[]{"foo", 4}), queryContext));
    InstanceResponseBlock metadataBlock = new InstanceResponseBlock(new MetadataResultsBlock());
    QueryExecutor queryExecutor = mockQueryExecutor(dataBlocks, metadataBlock);
    LeafStageTransferableBlockOperator operator =
        new LeafStageTransferableBlockOperator(OperatorTestUtil.getTracingContext(), mockQueryRequests(2), schema,
            queryExecutor, _executorService);
    _operatorRef.set(operator);

    // Then: the 5th block should be EOS
    Assert.assertTrue(operator.nextBlock().isDataBlock());
    Assert.assertTrue(operator.nextBlock().isDataBlock());
    Assert.assertTrue(operator.nextBlock().isDataBlock());
    Assert.assertTrue(operator.nextBlock().isDataBlock());
    Assert.assertTrue(operator.nextBlock().isEndOfStreamBlock(), "Expected EOS after reading 5 blocks");

    operator.close();
  }