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 shouldMaskFallbackInsertStatement() {
    // Given
    final String query = "--this is a comment. \n"
        + "INSERT INTO foo (KEY_COL, COL_A) VALUES"
        + "(\"key\", 0.125, '{something}', 1, C, 2.3E);";

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

    // Then
    final String expected = "--this is a comment. \n"
        + "INSERT INTO foo (KEY_COL, COL_A) VALUES"
        + "('[value]','[value]','[value]','[value]','[value]','[value]');";

    // Then
    assertThat(maskedQuery, is(expected));
  }