final BlackScholesMertonProcess stochProcess = new BlackScholesMertonProcess(
new Handle<Quote>(u),
new Handle<YieldTermStructure>(qTS),
new Handle<YieldTermStructure>(rTS),
new Handle<BlackVolTermStructure>(volTS));
final PricingEngine engine = new AnalyticEuropeanEngine(stochProcess);
final EuropeanOption option1 = new EuropeanOption(payoff, exercise);
final EuropeanOption option2 = new EuropeanOption(payoff, exercise);
option1.setPricingEngine(engine);
option2.setPricingEngine(engine);