void handleLine(final String line) {
    final String trimmedLine = Optional.ofNullable(line).orElse("").trim();
    if (trimmedLine.isEmpty()) {
      return;
    }

    handleStatements(trimmedLine);
  }
@Test
  public void shouldExplainQueryId() {
    // Given:
    localCli.handleLine("CREATE STREAM " + streamName + " "
        + "AS SELECT * FROM " + ORDER_DATA_PROVIDER.sourceName() + ";");

    final String queryId = extractQueryId(terminal.getOutputString());

    final String explain = "EXPLAIN " + queryId + ";";

    // When:
    localCli.handleLine(explain);

    // Then:
    assertThat(terminal.getOutputString(), containsString(queryId));
    assertThat(terminal.getOutputString(), containsString("Status"));
    assertThat(terminal.getOutputString(),
        either(containsString("REBALANCING"))
            .or(containsString("RUNNING")));

    dropStream(streamName);
  }