@Test
public void plusMultipliedBy() {
final Currency ccy1 = Currency.AUD;
final Currency ccy2 = Currency.CAD;
final InflationSensitivity cs = InflationSensitivity.of(SENSI_11, SENSI_FWD_11, SENSI_33);
MultipleCurrencyInflationSensitivity mcs = MultipleCurrencyInflationSensitivity.of(ccy1, cs);
final InflationSensitivity cs2 = InflationSensitivity.ofYieldDiscounting(SENSI_22);
final MultipleCurrencyInflationSensitivity mcs2 = MultipleCurrencyInflationSensitivity.of(ccy1, cs2);
final MultipleCurrencyInflationSensitivity mcs3 = mcs.plus(mcs2);
final Map<String, List<DoublesPair>> sum = InterestRateCurveSensitivityUtils.addSensitivity(SENSI_11, SENSI_22);
final MultipleCurrencyInflationSensitivity mcs3Expected = MultipleCurrencyInflationSensitivity.of(ccy1, InflationSensitivity.of(sum, SENSI_FWD_11, SENSI_33));
AssertSensivityObjects.assertEquals("", mcs3Expected.cleaned(), mcs3.cleaned(), TOLERANCE);
mcs = mcs.plus(ccy2, cs);
assertEquals("MultipleCurrencyCurveSensitivityMarket: plusMultipliedBy", cs, mcs.getSensitivity(ccy1));
assertEquals("MultipleCurrencyCurveSensitivityMarket: plusMultipliedBy", cs, mcs.getSensitivity(ccy2));
AssertSensivityObjects.assertEquals("", mcs.plus(mcs).cleaned(), mcs.multipliedBy(2.0).cleaned(), TOLERANCE);
}