EuropeanExchangeOptionFunctionProvider extends OptionFunctionProvider2D { @Override public double getStrike() { throw new IllegalArgumentException("Strike is not relavant for this option"); } EuropeanExchangeOptionFunctionProvider(final double timeToExpiry, final int steps, final double quantity1, final double quantity2); @Override double[][] getPayoffAtExpiry(final double assetPrice1, final double assetPrice2, final double upOverDown1, final double upOverDown2); double[][] getPayoffAtExpiryTrinomial(final double assetPrice1, final double assetPrice2, final double middleOverDown1, final double middleOverDown2); @Override double getSign(); @Override double getStrike(); double getQuantity1(); double getQuantity2(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void getStrikeTest() { final OptionFunctionProvider2D function = new EuropeanExchangeOptionFunctionProvider(TIME, 1001, 3., 2.); function.getStrike(); }