final double[] k = new double[n];
final double[] vol = new double[n];
for (int i = 0; i < n; i++) {
k[i] = strikeNPrice[i][0];
vol[i] = BLACK_IMPLIED_VOL.getImpliedVolatility(new BlackFunctionData(FORWARD, DF, 0.0), new EuropeanVanillaOption(k[i], t, isCall), strikeNPrice[i][1]);
}
final Interpolator1DDataBundle dataBundle = INTERPOLATOR.getDataBundleFromSortedArrays(k, vol);
final double[][] strikeNPrice2 = PRICER.price(FORWARD, DF, t, isCall, heston, 0.7 * FORWARD, 1.5 * FORWARD, nStrikes, 0.2, 0.75, 1e-8);
final int m = strikeNPrice2.length;
for (int i = 0; i < m; i++) {
final double strike = strikeNPrice2[i][0];
final double sigma = BLACK_IMPLIED_VOL.getImpliedVolatility(new BlackFunctionData(FORWARD, DF, 0.0), new EuropeanVanillaOption(strike, t, isCall), strikeNPrice2[i][1]);
assertEquals(sigma, INTERPOLATOR.interpolate(dataBundle, strike), 1e-5);
}
}