switch (exercise.type()) {
case European:
engine = new AnalyticDividendEuropeanEngine(newProcess);
break;
case American:
engine = new FDDividendAmericanEngine(newProcess);
break;
case Bermudan:
throw new LibraryException("engine not available for Bermudan option with dividends"); // TODO: message
default:
throw new LibraryException("unknown exercise type"); // // TODO: message