fxRates[i][j] = Math.random();
}
}
final FXMatrix matrix = new FXMatrix(map, fxRates);
final Map<Currency, YieldAndDiscountCurve> discounting = new LinkedHashMap<>();
discounting.put(Currency.USD, new YieldCurve("A", ConstantDoublesCurve.from(0.06, "a")));
discounting.put(Currency.EUR, new DiscountCurve("B", ConstantDoublesCurve.from(0.99, "b")));
final Map<IborIndex, YieldAndDiscountCurve> ibor = new LinkedHashMap<>();
ibor.put(new IborIndex(Currency.USD, Period.ofMonths(3), 0, DayCountFactory.INSTANCE.getDayCount("Act/360"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"), false, "L"),
new YieldCurve("C", ConstantDoublesCurve.from(0.03, "c")));
ibor.put(new IborIndex(Currency.EUR, Period.ofMonths(6), 1, DayCountFactory.INSTANCE.getDayCount("Act/360"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"), false, "P"),
new YieldCurve("D", ConstantDoublesCurve.from(0.03, "d")));
final Map<IndexON, YieldAndDiscountCurve> overnight = new LinkedHashMap<>();
overnight.put(new IndexON("NAME1", Currency.USD, DayCountFactory.INSTANCE.getDayCount("Act/360"), 1), new YieldCurve("E", ConstantDoublesCurve.from(0.003, "e")));
overnight.put(new IndexON("NAME2", Currency.EUR, DayCountFactory.INSTANCE.getDayCount("Act/360"), 0), new YieldCurve("F", ConstantDoublesCurve.from(0.006, "f")));
final MulticurveProviderDiscount provider = new MulticurveProviderDiscount(discounting, ibor, overnight, matrix);
final Map<Pair<String, Currency>, YieldAndDiscountCurve> curves = new HashMap<>();
curves.put(Pair.of("E", Currency.USD), new YieldCurve("L", ConstantDoublesCurve.from(0.1234, "l")));
curves.put(Pair.of("F", Currency.EUR), new YieldCurve("P", ConstantDoublesCurve.from(0.1234, "p")));
final IssuerProviderDiscount issuer = new IssuerProviderDiscount(provider, curves);
assertEquals(issuer, cycleObject(IssuerProviderDiscount.class, issuer));
}