AmericanExchangeOptionFunctionProvider extends OptionFunctionProvider2D { @Override public double getSign() { throw new IllegalArgumentException("Call/put is not relevant for this option"); } AmericanExchangeOptionFunctionProvider(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); @Override double[][] getNextOptionValues(final double discount, final double uuProbability, final double udProbability, final double duProbability, final double ddProbability,
      final double[][] values, final double baseAssetPrice1, final double baseAssetPrice2, final double downFactor1, final double downFactor2,
      final double upOverDown1, final double upOverDown2, final int steps); @Override double[][] getPayoffAtExpiryTrinomial(final double assetPrice1, final double assetPrice2, final double middleOverDown1, final double middleOverDown2); @Override double[][] getNextOptionValues(final double discount, final double uuProbability, final double umProbability, final double udProbability, final double muProbability,
      final double mmProbability, final double mdProbability, final double duProbability, final double dmProbability, final double ddProbability, final double[][] values,
      final double baseAssetPrice1, final double baseAssetPrice2, final double downFactor1, final double downFactor2, final double middleOverDown1, final double middleOverDown2, final int steps); @Override double getSign(); @Override double getStrike(); double getQuantity1(); double getQuantity2(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void getSignTest() { final OptionFunctionProvider2D function = new AmericanExchangeOptionFunctionProvider(2., 1001, 3., 2.); function.getSign(); }