YieldCurveBundle { public void setCurve(final String name, final YieldAndDiscountCurve curve) { ArgumentChecker.notNull(name, "name"); ArgumentChecker.notNull(curve, "curve"); if (_curves.containsKey(name)) { throw new IllegalArgumentException("Named yield curve already set: " + name); } _curves.put(name, curve); } YieldCurveBundle();  YieldCurveBundle(final FXMatrix fxMatrix, final Map<String, Currency> curveCurrency, final Map<String, ? extends YieldAndDiscountCurve> curvesMap);  YieldCurveBundle(final FXMatrix fxMatrix, final Map<String, Currency> curveCurrency);  YieldCurveBundle(final Map<String, ? extends YieldAndDiscountCurve> curvesMap);  YieldCurveBundle(final String[] names, final YieldAndDiscountCurve[] curves);  YieldCurveBundle(final FXMatrix fxMatrix, final String[] names, final YieldAndDiscountCurve[] curves);  YieldCurveBundle(final Map<String, ? extends YieldAndDiscountCurve> curvesMap, final FXMatrix fxMatrix, final Map<String, Currency> curveCurrency);  YieldCurveBundle(final String[] names, final YieldAndDiscountCurve[] curves, final Currency[] currencies);  YieldCurveBundle(final YieldCurveBundle bundle); YieldCurveBundle copy(); void setCurve(final String name, final YieldAndDiscountCurve curve); void replaceCurve(final String name, final YieldAndDiscountCurve curve); void addAll(final YieldCurveBundle other); YieldAndDiscountCurve getCurve(final String name); Map<String, YieldAndDiscountCurve> getCurvesMap(); int size(); Set<String> getAllNames(); Boolean containsName(final String curveName); Map<String, Currency> getCurrencyMap(); Currency getCurveCurrency(final String curveName); FXMatrix getFxRates(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testSetNullName() { BUNDLE.setCurve(null, CURVES[1]); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testSetNullCurve() { BUNDLE.setCurve("D", null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testAddPreviousCurve() { BUNDLE.setCurve(NAMES[0], CURVES[2]); }