SimpleChooserOptionDefinition extends OptionDefinition { @Override public OptionExerciseFunction<StandardOptionDataBundle> getExerciseFunction() { return _exerciseFunction; } SimpleChooserOptionDefinition(final Expiry chooseDate, final double underlyingStrike, final Expiry underlyingExpiry); OptionDefinition getCallDefinition(); OptionDefinition getPutDefinition(); double getUnderlyingStrike(); Expiry getUnderlyingExpiry(); @Override OptionExerciseFunction<StandardOptionDataBundle> getExerciseFunction(); @Override OptionPayoffFunction<StandardOptionDataBundle> getPayoffFunction(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testExerciseFunction() { final OptionExerciseFunction<StandardOptionDataBundle> exercise = CHOOSER.getExerciseFunction(); assertFalse(exercise.shouldExercise(DATA, STRIKE - DIFF)); assertFalse(exercise.shouldExercise(DATA, STRIKE + DIFF)); }