@Test
/**
* Tests the present value curve sensitivity to parallel curve movements of fixed accrued compounding coupons.
*/
public void presentValueParallelCurveSensitivityWithAccrualDates() {
final MultipleCurrencyMulticurveSensitivity pvpcsComputed = METHOD.presentValueCurveSensitivity(CPN_PAY_WITH_ACCRUAL_DATES, MULTICURVES);
final double pvpcsExpectedDouble = -CPN_PAY_WITH_ACCRUAL_DATES.getPaymentTime() * CPN_PAY_WITH_ACCRUAL_DATES.getAmount() *
MULTICURVES.getDiscountFactor(CPN_PAY_WITH_ACCRUAL_DATES.getCurrency(), CPN_PAY_WITH_ACCRUAL_DATES.getPaymentTime());
final Map<String, List<DoublesPair>> mapDsc = new HashMap<>();
final DoublesPair s = new DoublesPair(CPN_PAY_WITH_ACCRUAL_DATES.getPaymentTime(), pvpcsExpectedDouble);
final List<DoublesPair> list = new ArrayList<>();
list.add(s);
mapDsc.put(MULTICURVES.getName(CPN_PAY_WITH_ACCRUAL_DATES.getCurrency()), list);
MultipleCurrencyMulticurveSensitivity pvpcsExpected = new MultipleCurrencyMulticurveSensitivity();
pvpcsExpected = pvpcsExpected.plus(CPN_PAY_WITH_ACCRUAL_DATES.getCurrency(), MulticurveSensitivity.ofYieldDiscounting(mapDsc));
AssertSensivityObjects.assertEquals("CouponFixedAccruedCompounding: Present value parallel curve sensitivity by discounting", pvpcsExpected, pvpcsComputed, 1.0E-2);
}