public Command create(
      final ConfiguredStatement<? extends Statement> statement,
      final KsqlExecutionContext context) {
    return create(statement, context.getServiceContext(), context);
  }
@Test
  public void shouldCreateCommandForPlannedQueryInDedicatedRuntime() {
    // Given:
    givenPlannedQuery();
    PersistentQueryMetadataImpl queryMetadata = mock(PersistentQueryMetadataImpl.class);
    when(executionContext.execute(any(), any(ConfiguredKsqlPlan.class))).thenReturn(result);
    when(result.getQuery()).thenReturn(Optional.ofNullable(queryMetadata));
    when(config.getBoolean(KsqlConfig.KSQL_SHARED_RUNTIME_ENABLED)).thenReturn(true);

    // When:
    final Command command = commandFactory.create(configuredStatement, executionContext);

    // Then:
    assertThat(command,
        is(Command.of(
            ConfiguredKsqlPlan.of(
                A_PLAN,
                SessionConfig.of(config,
                    ImmutableMap.of(KsqlConfig.KSQL_SHARED_RUNTIME_ENABLED, false))))));
  }