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 shouldFormatAlterStatement() {
    // Given:
    final String statementString = "ALTER STREAM FOO ADD COLUMN A STRING, ADD COLUMN B INT;";
    final Statement statement = parseSingle(statementString);

    // When:
    final String result = SqlFormatter.formatSql(statement);

    // Then:
    assertThat(result, is("ALTER STREAM FOO\n"
        + "ADD COLUMN A STRING,\n"
        + "ADD COLUMN B INTEGER;"));
  }