ExtremeSpreadOptionDefinition extends OptionDefinition { @SuppressWarnings("unchecked") @Override public OptionExerciseFunction<StandardOptionWithSpotTimeSeriesDataBundle> getExerciseFunction() { return _exerciseFunction; } ExtremeSpreadOptionDefinition(final Expiry expiry, final boolean isCall, final Expiry periodEnd, final boolean isReverse); @SuppressWarnings("unchecked") @Override OptionExerciseFunction<StandardOptionWithSpotTimeSeriesDataBundle> getExerciseFunction(); @SuppressWarnings("unchecked") @Override OptionPayoffFunction<StandardOptionWithSpotTimeSeriesDataBundle> getPayoffFunction(); double getTimeFromPeriodEnd(final ZonedDateTime date); Expiry getPeriodEnd(); boolean isReverse(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testExercise() { assertFalse(PUT.getExerciseFunction().shouldExercise(DATA, null)); assertFalse(PUT_REVERSE.getExerciseFunction().shouldExercise(DATA, null)); }