dividends.add(dividendValue);
final StrikedTypePayoff payoff = new PlainVanillaPayoff(type, strike);
final StrikedTypePayoff refPayoff = new PlainVanillaPayoff(type, strike + dividendValue);
final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(new Handle<Quote>(spot), qTS, rTS, volTS);
final PricingEngine engine = new AnalyticDividendEuropeanEngine(stochProcess);
final PricingEngine ref_engine = new AnalyticEuropeanEngine(stochProcess);
final DividendVanillaOption option = new DividendVanillaOption(payoff, exercise,dividendDates, dividends);
option.setPricingEngine(engine);
final VanillaOption ref_option = new VanillaOption(refPayoff, exercise);