final double notional = 100000000;
final ZonedDateTime payDate = ScheduleCalculator.getAdjustedDate(REFERENCE_DATE, Period.ofMonths(9), BUSINESS_DAY, CALENDAR);
final ZonedDateTime expDate = ScheduleCalculator.getAdjustedDate(payDate, -SETTLEMENT_DAYS, CALENDAR);
final double timeToExpiry = TimeCalculator.getTimeBetween(REFERENCE_DATE, expDate);
final ForexDefinition forexUnderlyingDefinition = new ForexDefinition(EUR, USD, payDate, notional, strike);
final ForexOptionVanillaDefinition callDefinition = new ForexOptionVanillaDefinition(forexUnderlyingDefinition, expDate, isCall, isLong);
final ForexOptionVanilla call = callDefinition.toDerivative(REFERENCE_DATE, CURVES_NAME);
final double df = CURVES.getCurve(CURVES_NAME[1]).getDiscountFactor(TimeCalculator.getTimeBetween(REFERENCE_DATE, payDate));
final double forward = SPOT * CURVES.getCurve(CURVES_NAME[0]).getDiscountFactor(TimeCalculator.getTimeBetween(REFERENCE_DATE, payDate)) / df;
final double volatility = SMILE_TERM.getVolatility(timeToExpiry, strike, forward);
final double thetaUnit = BlackFormulaRepository.driftlessTheta(forward, strike, timeToExpiry, volatility);
final double thetaExpected = thetaUnit * notional;
final CurrencyAmount thetaCallComputed = METHOD_OPTION.theta(call, SMILE_BUNDLE);
assertEquals("Theta theoretical: forex option", thetaExpected, thetaCallComputed.getAmount(), TOLERANCE_PV);
assertEquals("Theta theoretical: forex option", USD, thetaCallComputed.getCurrency());
final ForexOptionVanillaDefinition putDefinition = new ForexOptionVanillaDefinition(forexUnderlyingDefinition, expDate, !isCall, isLong);
final ForexOptionVanilla put = putDefinition.toDerivative(REFERENCE_DATE, CURVES_NAME);
final CurrencyAmount thetaPutComputed = METHOD_OPTION.theta(put, SMILE_BUNDLE);
assertEquals("Theta theoretical: forex option", thetaCallComputed.getAmount(), thetaPutComputed.getAmount(), TOLERANCE_PV);
}