### Question:
SsviFormulaData implements SmileModelData, ImmutableBean, Serializable { @Override public boolean isAllowed(int index, double value) { switch (index) { case 0: return value > 0; case 1: return value >= -1 && value <= 1; case 2: return value > 0; default: throw new IllegalArgumentException("index " + index + " outside range"); } } private  SsviFormulaData(
      DoubleArray parameters); static SsviFormulaData of(double sigma, double rho, double eta); static SsviFormulaData of(double[] parameters); double getSigma(); double getRho(); double getEta(); SsviFormulaData withSigma(double sigma); SsviFormulaData withRho(double rho); SsviFormulaData withEta(double eta); @Override int getNumberOfParameters(); @Override double getParameter(int index); @Override boolean isAllowed(int index, double value); @Override SsviFormulaData with(int index, double value); static TypedMetaBean<SsviFormulaData> meta(); @Override TypedMetaBean<SsviFormulaData> metaBean(); DoubleArray getParameters(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void testWrongIndex() { assertThatIllegalArgumentException() .isThrownBy(() -> DATA.isAllowed(-1, ETA)); }