### Question:
PercentileCalculator implements Function<double[], Double> { public void setPercentile(double percentile) { ArgChecker.isTrue(percentile > 0 && percentile < 1, "Percentile must be between 0 and 1"); _percentile = percentile; } PercentileCalculator(double percentile); void setPercentile(double percentile); @Override Double apply(double[] x);  }### Answer:
@Test public void testSetHighPercentile() { assertThatIllegalArgumentException() .isThrownBy(() -> CALCULATOR.setPercentile(1)); }
@Test public void testSetLowPercentile() { assertThatIllegalArgumentException() .isThrownBy(() -> CALCULATOR.setPercentile(0)); }