CappedPowerOptionFunctionProvider extends OptionFunctionProvider1D { public double getPower() { return _power; } CappedPowerOptionFunctionProvider(final double strike, final double timeToExpiry, final int steps, final boolean isCall, final double power, final double cap); @Override double[] getPayoffAtExpiry(final double assetPrice, final double downFactor, final double upOverDown); @Override double[] getPayoffAtExpiryTrinomial(final double assetPrice, final double downFactor, final double middleOverDown); double getPower(); double getCap(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void getPowerTest() { final CappedPowerOptionFunctionProvider function = new CappedPowerOptionFunctionProvider(103., TIME, 1003, true, 4., 30.); assertEquals(function.getPower(), 4.); }