FadeInOptionDefinition extends OptionDefinition { @SuppressWarnings("unchecked") @Override public OptionExerciseFunction<StandardOptionWithSpotTimeSeriesDataBundle> getExerciseFunction() { return _exerciseFunction; } FadeInOptionDefinition(final double strike, final Expiry expiry, final boolean isCall, final double lowerBound, final double upperBound); double getLowerBound(); double getUpperBound(); @Override int hashCode(); @Override boolean equals(final Object obj); @SuppressWarnings("unchecked") @Override OptionExerciseFunction<StandardOptionWithSpotTimeSeriesDataBundle> getExerciseFunction(); @SuppressWarnings("unchecked") @Override OptionPayoffFunction<StandardOptionWithSpotTimeSeriesDataBundle> getPayoffFunction();  }
@Test public void testExerciseFunction() { OptionExerciseFunction<StandardOptionWithSpotTimeSeriesDataBundle> exercise = CALL.getExerciseFunction(); assertFalse(exercise.shouldExercise(ALL_DATA, null)); assertFalse(exercise.shouldExercise(ONE_DATA, null)); exercise = PUT.getExerciseFunction(); assertFalse(exercise.shouldExercise(ALL_DATA, null)); assertFalse(exercise.shouldExercise(ONE_DATA, null)); }