public static StatementExecutorResponse execute(
      final ConfiguredStatement<ListProperties> statement,
      final SessionProperties sessionProperties,
      final KsqlExecutionContext executionContext,
      final ServiceContext serviceContext
  ) {
    final KsqlConfigResolver resolver = new KsqlConfigResolver();

    final Map<String, String> engineProperties = statement
        .getSessionConfig()
        .getConfig(false)
        .getAllConfigPropsWithSecretsObfuscated();

    final List<Property> mergedProperties = mergedProperties(statement);

    final List<String> overwritten = mergedProperties
        .stream()
        .filter(property -> !Objects.equals(
            engineProperties.get(property.getName()), property.getValue()))
        .map(Property::getName)
        .collect(Collectors.toList());

    final List<String> defaultProps = mergedProperties.stream()
        .filter(property -> resolver.resolve(property.getName(), false)
            .map(resolved -> resolved.isDefaultValue(property.getValue()))
            .orElse(false))
        .map(Property::getName)
        .collect(Collectors.toList());

    return StatementExecutorResponse.handled(Optional.of(new PropertiesList(
        statement.getMaskedStatementText(), mergedProperties, overwritten, defaultProps)));
  }
@Test
  public void shouldContainLevelField() {
    // When:
    final PropertiesList properties = (PropertiesList) CustomExecutors.LIST_PROPERTIES.execute(
        engine.configure("LIST PROPERTIES;"),
        mock(SessionProperties.class),
        engine.getEngine(),
        engine.getServiceContext()
    ).getEntity().orElseThrow(IllegalStateException::new);

    // Then:
    assertThat(toMap(properties).get(KsqlConfig.KSQL_EXT_DIR).getLevel(), equalTo("SERVER"));
    assertThat(toMap(properties).get(KsqlConfig.KSQL_STRING_CASE_CONFIG_TOGGLE).getLevel(), equalTo("QUERY"));
  }