CappedPowerOptionDefinition extends OptionDefinition { @Override public OptionPayoffFunction<StandardOptionDataBundle> getPayoffFunction() { return _payoffFunction; } CappedPowerOptionDefinition(final double strike, final Expiry expiry, final double power, final double cap, final boolean isCall); double getPower(); double getCap(); @Override OptionExerciseFunction<StandardOptionDataBundle> getExerciseFunction(); @Override OptionPayoffFunction<StandardOptionDataBundle> getPayoffFunction(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullDataBundle() { CALL.getPayoffFunction().getPayoff(null, null); }