DividendFunctionProvider { public abstract double spotModifier(final double spot, final double interestRate); DividendFunctionProvider(final double[] dividendTimes, final double[] dividends); abstract double spotModifier(final double spot, final double interestRate); abstract double dividendCorrections(final double assetPrice, final double interestRate, final double offset, final int k); abstract double[] getAssetPricesForDelta(final double spot, final double interestRate, final int[] divSteps, final double upFactor, final double downFactor, final double sumDiscountDiv); abstract double[] getAssetPricesForGamma(final double spot, final double interestRate, final int[] divSteps, final double upFactor, final double downFactor, final double sumDiscountDiv); abstract double[] getAssetPricesForDelta(final double spot, final double interestRate, final int[] divSteps, final double upFactor, final double middleFactor, final double downFactor,
      final double sumDiscountDiv); abstract double[] getAssetPricesForGamma(final double spot, final double interestRate, final int[] divSteps, final double upFactor, final double middleFactor, final double downFactor,
      final double sumDiscountDiv); int[] getDividendSteps(final double dt); boolean checkTimeSteps(final double dt); boolean checkDividendBeforeExpiry(final double timeToExpiry); double[] getDividendTimes(); double[] getDividends(); int getNumberOfDividends(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void tooBigCashDividendTest() { final double[] dividends = new double[] {1., 2., 300. }; final DividendFunctionProvider div = new CashDividendFunctionProvider(_times, dividends); div.spotModifier(100, 0.05); }