public static String getMaskedStatement(final String query) {
    try {
      final ParseTree tree = DefaultKsqlParser.getParseTree(query);
      return new Visitor().visit(tree);
    } catch (final Exception | StackOverflowError e) {
      return fallbackMasking(query);
    }
  }
@Test
  public void shouldMaskInsertStatement() {
    // Given
    final String query = "--this is a comment. \n"
        + "INSERT INTO foo (KEY_COL, COL_A) VALUES (\"key\", \"A\");";

    // When
    final String maskedQuery = QueryMask.getMaskedStatement(query);

    // Then
    final String expected = "INSERT INTO `FOO` (`KEY_COL`, `COL_A`) VALUES ('[value]', '[value]');";

    assertThat(maskedQuery, is(expected));
  }