MultipleCurrencyAmount implements ImmutableBean,
    Iterable<CurrencyAmount>, Serializable { public static MultipleCurrencyAmount of(final Currency currency, final double amount) { return new MultipleCurrencyAmount(ImmutableSortedMap.of(currency, CurrencyAmount.of(currency, amount))); } 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(expectedExceptions = IllegalArgumentException.class) public void testNullCurrency() { MultipleCurrencyAmount.of(null, A1); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCurrencyArray() { MultipleCurrencyAmount.of(null, A_ARRAY); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullInCurrencyArray() { MultipleCurrencyAmount.of(new Currency[] {CCY1, null, CCY2 }, A_ARRAY); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullAmountArray() { MultipleCurrencyAmount.of(CCY_ARRAY, null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testWrongLengthAmountArray() { MultipleCurrencyAmount.of(CCY_ARRAY, new double[] {A1, A2 }); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCurrencyList() { MultipleCurrencyAmount.of(null, A_LIST); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullInCurrencyList() { MultipleCurrencyAmount.of(Arrays.asList(CCY1, null, CCY2), A_LIST); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullAmountList() { MultipleCurrencyAmount.of(CCY_LIST, null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullInAmountList() { MultipleCurrencyAmount.of(CCY_LIST, Arrays.asList(null, A2, A3)); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testWrongLengthAmountList() { MultipleCurrencyAmount.of(CCY_LIST, Arrays.asList(A1, A2)); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullMap() { MultipleCurrencyAmount.of((Map<Currency, Double>) null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCurrencyInMap() { final Map<Currency, Double> map = new HashMap<Currency, Double>(); map.put(CCY1, A1); map.put(null, A2); map.put(CCY3, A3); MultipleCurrencyAmount.of(map); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullAmountInMap() { final Map<Currency, Double> map = new HashMap<Currency, Double>(); map.put(CCY1, A1); map.put(CCY2, null); map.put(CCY3, A3); MultipleCurrencyAmount.of(map); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCurrencyAmountArray() { MultipleCurrencyAmount.of((CurrencyAmount[]) null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullInCurrencyAmountArray() { MultipleCurrencyAmount.of(new CurrencyAmount[] {null, CA2, CA3 }); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCurrencyAmountList() { MultipleCurrencyAmount.of((List<CurrencyAmount>) null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullInCurrencyAmountList() { MultipleCurrencyAmount.of(Arrays.asList(null, CA2, CA3)); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullCurrencyAmountSet() { MultipleCurrencyAmount.of((Set<CurrencyAmount>) null); }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNullInCurrencyAmountSet() { MultipleCurrencyAmount.of(Sets.newHashSet(null, CA2, CA3)); }
@Test public void testConstructors() { assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CCY_LIST, A_LIST)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CCY_A_MAP)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CA_ARRAY)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CA_LIST)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CA_SET)); }
@Test public void testStaticConstruction() { assertEquals(MultipleCurrencyAmount.of(CCY1, A1), MultipleCurrencyAmount.of(CCY1, A1)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CCY_LIST, A_LIST)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CCY_A_MAP)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CA_ARRAY)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CA_LIST)); assertEquals(MULTIPLE, MultipleCurrencyAmount.of(CA_SET)); }