public static int countArguments(String sql) {
    int argCount = 0;
    for (int i = 0; i < sql.length(); i++) {
      if (sql.charAt(i) == '?') {
        argCount++;
      }
    }
    return argCount;
  }
@Test
  public void countArguments() {
    assertThat(SqlLogFormatter.countArguments("select * from issues")).isZero();
    assertThat(SqlLogFormatter.countArguments("select * from issues where id=?")).isOne();
    assertThat(SqlLogFormatter.countArguments("select * from issues where id=? and kee=?")).isEqualTo(2);
  }