FixedStrikeLookbackOptionDefinition extends OptionDefinition { @SuppressWarnings("unchecked") @Override public OptionExerciseFunction<StandardOptionWithSpotTimeSeriesDataBundle> getExerciseFunction() { return _exerciseFunction; } FixedStrikeLookbackOptionDefinition(final double strike, final Expiry expiry, final boolean isCall); @SuppressWarnings("unchecked") @Override OptionExerciseFunction<StandardOptionWithSpotTimeSeriesDataBundle> getExerciseFunction(); @SuppressWarnings("unchecked") @Override OptionPayoffFunction<StandardOptionWithSpotTimeSeriesDataBundle> getPayoffFunction(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testExercise() { assertFalse(CALL.getExerciseFunction().shouldExercise(HIGH_DATA, null)); assertFalse(CALL.getExerciseFunction().shouldExercise(LOW_DATA, null)); assertFalse(PUT.getExerciseFunction().shouldExercise(HIGH_DATA, null)); assertFalse(PUT.getExerciseFunction().shouldExercise(LOW_DATA, null)); }