public static String formatSql(final AstNode root) {
    final StringBuilder builder = new StringBuilder();
    new Formatter(builder).process(root, 0);
    return StringUtils.stripEnd(builder.toString(), "\n");
  }
@Test
  public void shouldFormatCreateStreamStatementWithHeader() {
    // Given:
    final CreateStream createStream = new CreateStream(
        TEST,
        ELEMENTS_WITH_HEADER,
        false,
        false,
        SOME_WITH_PROPS,
        false);

    // When:
    final String sql = SqlFormatter.formatSql(createStream);

    // Then:
    assertThat(sql, is("CREATE STREAM TEST (`k3` STRING HEADERS, `Foo` STRING) "
        + "WITH (KAFKA_TOPIC='topic_test', VALUE_FORMAT='JSON');"));
  }