@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));
 }
 @Test
 public void testPayoff() {
   final double eps = 1e-15;
   OptionPayoffFunction<StandardOptionWithSpotTimeSeriesDataBundle> payoff =
       CALL.getPayoffFunction();
   assertEquals(payoff.getPayoff(LOW_DATA, 0.), DIFF, eps);
   assertEquals(payoff.getPayoff(HIGH_DATA, 0.), 0, eps);
   payoff = PUT.getPayoffFunction();
   assertEquals(payoff.getPayoff(LOW_DATA, 0.), 0, eps);
   assertEquals(payoff.getPayoff(HIGH_DATA, 0.), DIFF, eps);
 }
 @Test
 public void testEqualsAndHashCode() {
   final OptionDefinition call1 = new FloatingStrikeLookbackOptionDefinition(EXPIRY, true);
   final OptionDefinition put1 = new FloatingStrikeLookbackOptionDefinition(EXPIRY, false);
   final OptionDefinition call2 =
       new FloatingStrikeLookbackOptionDefinition(
           new Expiry(DateUtils.getDateOffsetWithYearFraction(DATE, 3)), true);
   final OptionDefinition put2 =
       new FloatingStrikeLookbackOptionDefinition(
           new Expiry(DateUtils.getDateOffsetWithYearFraction(DATE, 3)), false);
   assertFalse(CALL.equals(PUT));
   assertEquals(call1, CALL);
   assertEquals(put1, PUT);
   assertEquals(call1.hashCode(), CALL.hashCode());
   assertEquals(put1.hashCode(), PUT.hashCode());
   assertFalse(call2.equals(CALL));
   assertFalse(put2.equals(PUT));
 }
 @Test(expectedExceptions = IllegalArgumentException.class)
 public void testNullTS() {
   CALL.getPayoffFunction().getPayoff(HIGH_DATA.withSpotTimeSeries(null), null);
 }
 @Test(expectedExceptions = IllegalArgumentException.class)
 public void testNullDataBundle() {
   CALL.getPayoffFunction().getPayoff(null, null);
 }