MultipleCurrencyAmount implements ImmutableBean,
    Iterable<CurrencyAmount>, Serializable { public MultipleCurrencyAmount with(final Currency currency, final double amount) { ArgumentChecker.notNull(currency, "currency"); TreeMap<Currency, CurrencyAmount> copy = new TreeMap<Currency, CurrencyAmount>(_currencyAmountMap); copy.put(currency, CurrencyAmount.of(currency, amount)); return new MultipleCurrencyAmount(copy); } private  MultipleCurrencyAmount(ImmutableSortedMap<Currency, CurrencyAmount> currencyAmountMap); private  MultipleCurrencyAmount(
      SortedMap<Currency, CurrencyAmount> currencyAmountMap); static MultipleCurrencyAmount of(final Currency currency, final double amount); static MultipleCurrencyAmount of(final Currency[] currencies, final double[] amounts); static MultipleCurrencyAmount of(final List<Currency> currencies, final List<Double> amounts); static MultipleCurrencyAmount of(final Map<Currency, Double> amountMap); static MultipleCurrencyAmount of(final CurrencyAmount... currencyAmounts); static MultipleCurrencyAmount of(final Iterable<CurrencyAmount> currencyAmounts); int size(); @Override Iterator<CurrencyAmount> iterator(); CurrencyAmount[] getCurrencyAmounts(); double getAmount(final Currency currency); CurrencyAmount getCurrencyAmount(final Currency currency); MultipleCurrencyAmount plus(final CurrencyAmount currencyAmountToAdd); MultipleCurrencyAmount plus(final Currency currency, final double amountToAdd); MultipleCurrencyAmount plus(final MultipleCurrencyAmount multipleCurrencyAmountToAdd); MultipleCurrencyAmount multipliedBy(final double factor); MultipleCurrencyAmount with(final Currency currency, final double amount); MultipleCurrencyAmount without(final Currency currency); @Override String toString(); static MultipleCurrencyAmount.Meta meta(); @Override MultipleCurrencyAmount.Meta metaBean(); @Override Property<R> property(String propertyName); @Override Set<String> propertyNames(); ImmutableSortedMap<Currency, CurrencyAmount> getCurrencyAmountMap(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testWith() { final double a = A2 * 10; final CurrencyAmount ca = CurrencyAmount.of(CCY2, a); final Set<CurrencyAmount> expected = Sets.newHashSet(CA1, ca, CA3); final MultipleCurrencyAmount mca = MultipleCurrencyAmount.of(CCY_LIST, A_LIST); final MultipleCurrencyAmount test = mca.with(CCY2, a); assertSameData(expected, test); }