MultipleCurrencyInterestRateCurveSensitivity { public static MultipleCurrencyInterestRateCurveSensitivity of(final Currency ccy, final InterestRateCurveSensitivity sensitivity) { ArgumentChecker.notNull(ccy, "Currency"); ArgumentChecker.notNull(sensitivity, "Sensitivity"); final TreeMap<Currency, InterestRateCurveSensitivity> map = new TreeMap<>(); map.put(ccy, sensitivity); return new MultipleCurrencyInterestRateCurveSensitivity(map); } MultipleCurrencyInterestRateCurveSensitivity(); private  MultipleCurrencyInterestRateCurveSensitivity(final TreeMap<Currency, InterestRateCurveSensitivity> sensitivity); static MultipleCurrencyInterestRateCurveSensitivity of(final Currency ccy, final InterestRateCurveSensitivity sensitivity); InterestRateCurveSensitivity getSensitivity(final Currency ccy); MultipleCurrencyInterestRateCurveSensitivity plus(final Currency ccy, final InterestRateCurveSensitivity sensitivity); MultipleCurrencyInterestRateCurveSensitivity plus(final MultipleCurrencyInterestRateCurveSensitivity other); MultipleCurrencyInterestRateCurveSensitivity multipliedBy(final double factor); MultipleCurrencyInterestRateCurveSensitivity cleaned(); Set<Currency> getCurrencies(); MultipleCurrencyInterestRateCurveSensitivity converted(final Currency ccy, final FXMatrix fx); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void nullCurrency() { MultipleCurrencyInterestRateCurveSensitivity.of(null, IRCS); }
@Test(expectedExceptions = IllegalArgumentException.class) public void nullIRCS() { MultipleCurrencyInterestRateCurveSensitivity.of(USD, null); }
@Test public void of() { final MultipleCurrencyInterestRateCurveSensitivity mcIRCS = MultipleCurrencyInterestRateCurveSensitivity.of(USD, IRCS); assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS, mcIRCS.getSensitivity(USD)); assertEquals("MultipleCurrencyInterestRateCurveSensitivity", IRCS_EMPTY, mcIRCS.getSensitivity(EUR)); }