public Command create(
      final ConfiguredStatement<? extends Statement> statement,
      final KsqlExecutionContext context) {
    return create(statement, context.getServiceContext(), context);
  }
@Test
  public void shouldFailValidationForTerminateUnknownQuery() {
    // Given:
    configuredStatement = configuredStatement("TERMINATE X", terminateQuery);
    when(terminateQuery.getQueryId()).thenReturn(Optional.of(QUERY_ID));
    when(executionContext.getPersistentQuery(QUERY_ID)).thenReturn(Optional.empty());

    // When:
    final Exception e = assertThrows(
        KsqlStatementException.class,
        () -> commandFactory.create(configuredStatement, executionContext)
    );

    // Then:
    assertThat(e.getMessage(), containsString("Unknown queryId"));

  }