SupershareOptionDefinition extends OptionDefinition { @Override public OptionExerciseFunction<StandardOptionDataBundle> getExerciseFunction() { return _exerciseFunction; } SupershareOptionDefinition(final Expiry expiry, final double lowerBound, final double upperBound); @Override OptionExerciseFunction<StandardOptionDataBundle> getExerciseFunction(); @Override OptionPayoffFunction<StandardOptionDataBundle> getPayoffFunction(); double getLowerBound(); double getUpperBound(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testExercise() { final OptionExerciseFunction<StandardOptionDataBundle> f = OPTION.getExerciseFunction(); assertFalse(f.shouldExercise(DATA, null)); StandardOptionDataBundle data = DATA.withSpot(5); assertFalse(f.shouldExercise(data, null)); data = DATA.withSpot(35); assertFalse(f.shouldExercise(data, null)); }