public static StatementExecutorResponse execute(
      final ConfiguredStatement<Explain> statement,
      final SessionProperties sessionProperties,
      final KsqlExecutionContext executionContext,
      final ServiceContext serviceContext
  ) {
    return StatementExecutorResponse.handled(Optional
        .of(ExplainExecutor.explain(
            serviceContext,
            statement,
            executionContext,
            sessionProperties)));
  }
@Test
  public void shouldFailOnNonQueryExplain() {
    // When:
    final Exception e = assertThrows(
        KsqlException.class,
        () -> CustomExecutors.EXPLAIN.execute(
            engine.configure("Explain SHOW TOPICS;"),
            sessionProperties,
            engine.getEngine(),
            engine.getServiceContext()
        )
    );

    // Then:
    assertThat(e.getMessage(), containsString(
        "The provided statement does not run a ksql query"));
  }