LogOptionFunctionProvider extends OptionFunctionProvider1D { @Override public double getSign() { throw new IllegalArgumentException("Call/put is not relevant"); } LogOptionFunctionProvider(final double strike, final double timeToExpiry, final int steps); @Override double[] getPayoffAtExpiry(final double assetPrice, final double downFactor, final double upOverDown); @Override double[] getPayoffAtExpiryTrinomial(final double assetPrice, final double downFactor, final double middleOverDown); @Override double getSign(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void getSignErrorTest() { final double strike = 100.; final int steps = 801; final OptionFunctionProvider1D function = new LogOptionFunctionProvider(strike, 1., steps); function.getSign(); }