final MulticurveProviderInterface multicurve = sabr.getMulticurveProvider();
final EuropeanVanillaOption option = new EuropeanVanillaOption(cap.getStrike(), cap.getFixingTime(), cap.isCap());
final double forward = multicurve.getForwardRate(cap.getIndex(), cap.getFixingPeriodStartTime(), cap.getFixingPeriodEndTime(), cap.getFixingAccrualFactor());
final double df = multicurve.getDiscountFactor(cap.getCurrency(), cap.getPaymentTime());
final MulticurveSensitivity forwardDr = MulticurveSensitivity.ofForward(multicurve.getName(cap.getIndex()),
new ForwardSensitivity(cap.getFixingPeriodStartTime(), cap.getFixingPeriodEndTime(), cap.getFixingAccrualFactor(), 1.0));
final double dfDr = -cap.getPaymentTime() * df;
final double maturity = cap.getFixingPeriodEndTime() - cap.getFixingPeriodStartTime();
final double[] volatilityAdjoint = sabr.getSABRParameter().getVolatilityAdjoint(cap.getFixingTime(), maturity, cap.getStrike(), forward);
final BlackFunctionData dataBlack = new BlackFunctionData(forward, 1.0, volatilityAdjoint[0]);
final double[] bsAdjoint = BLACK_FUNCTION.getPriceAdjoint(option, dataBlack);