EuropeanOptionOnEuropeanVanillaOptionDefinition extends OptionDefinition { @Override public OptionExerciseFunction<StandardOptionDataBundle> getExerciseFunction() { return _exerciseFunction; } EuropeanOptionOnEuropeanVanillaOptionDefinition(final double strike, final Expiry expiry, final boolean isCall, final double underlyingStrike, final Expiry underlyingExpiry,
      final boolean isUnderlyingCall);  EuropeanOptionOnEuropeanVanillaOptionDefinition(final double strike, final Expiry expiry, final boolean isCall, final EuropeanVanillaOptionDefinition underlyingOption); @Override OptionExerciseFunction<StandardOptionDataBundle> getExerciseFunction(); @Override OptionPayoffFunction<StandardOptionDataBundle> getPayoffFunction(); OptionDefinition getUnderlyingOption(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testExerciseFunction() { assertFalse(OPTION.getExerciseFunction().shouldExercise(DATA, null)); assertFalse(new EuropeanOptionOnEuropeanVanillaOptionDefinition(STRIKE, EXPIRY, false, UNDERLYING).getExerciseFunction().shouldExercise(DATA, null)); }