//test the new backwards local vol method for expected variance
final YieldAndDiscountCurve yieldCurve = new YieldCurve("test", ConstantDoublesCurve.from(DRIFT));
final AffineDividends ad = AffineDividends.noDividends();
final EquityVarianceSwapBackwardsPurePDE backSolver = new EquityVarianceSwapBackwardsPurePDE();
final PureLocalVolatilitySurface plv = new PureLocalVolatilitySurface(ConstantDoublesSurface.from(FLAT_VOL));
final double[] res2 = backSolver.expectedVariance(SPOT, yieldCurve, ad, EXPIRY, plv);
final double kVol2 = Math.sqrt(res2[0] / EXPIRY);
assertEquals(FLAT_VOL, kVol2, 1e-6);
}