### Question:
Queries { @NonNull public static String placeholders(final int numberOfPlaceholders) { if (numberOfPlaceholders == 1) { return "?"; } else if (numberOfPlaceholders == 0) { return ""; } else if (numberOfPlaceholders < 0) { throw new IllegalArgumentException("numberOfPlaceholders must be >= 0, but was = " + numberOfPlaceholders); } final StringBuilder stringBuilder = new StringBuilder((numberOfPlaceholders * 2) - 1); for (int i = 0; i < numberOfPlaceholders; i++) { stringBuilder.append('?'); if (i != numberOfPlaceholders - 1) { stringBuilder.append(','); } } return stringBuilder.toString(); } private  Queries(); @NonNull static String placeholders(final int numberOfPlaceholders);  }### Answer:
@Test public void placeholdersMinus1() { try { Queries.placeholders(-1); failBecauseExceptionWasNotThrown(IllegalArgumentException.class); } catch (IllegalArgumentException expected) { assertThat(expected) .hasMessage("numberOfPlaceholders must be >= 0, but was = -1") .hasNoCause(); } }
@Test public void placeholders0() { assertThat(Queries.placeholders(0)).isEqualTo(""); }
@Test public void placeholders1() { assertThat(Queries.placeholders(1)).isEqualTo("?"); }
@Test public void placeholders2() { assertThat(Queries.placeholders(2)).isEqualTo("?,?"); }
@Test public void placeholders3() { assertThat(Queries.placeholders(3)).isEqualTo("?,?,?"); }