### Question:
CurrencyAmountArray implements FxConvertible<CurrencyAmountArray>, ImmutableBean, Serializable { public static CurrencyAmountArray of(Currency currency, DoubleArray values) { return new CurrencyAmountArray(currency, values); } private  CurrencyAmountArray(
      Currency currency,
      DoubleArray values); static CurrencyAmountArray of(Currency currency, DoubleArray values); static CurrencyAmountArray of(List<CurrencyAmount> amounts); static CurrencyAmountArray of(int size, IntFunction<CurrencyAmount> valueFunction); int size(); CurrencyAmount get(int index); Stream<CurrencyAmount> stream(); @Override CurrencyAmountArray convertedTo(Currency resultCurrency, FxRateProvider fxRateProvider); CurrencyAmountArray plus(CurrencyAmountArray other); CurrencyAmountArray plus(CurrencyAmount amount); CurrencyAmountArray minus(CurrencyAmountArray other); CurrencyAmountArray minus(CurrencyAmount amount); static CurrencyAmountArray.Meta meta(); @Override CurrencyAmountArray.Meta metaBean(); Currency getCurrency(); DoubleArray getValues(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_CurrencyList_mixedCurrency() { List<CurrencyAmount> values = ImmutableList.of( CurrencyAmount.of(GBP, 1), CurrencyAmount.of(USD, 2), CurrencyAmount.of(GBP, 3)); assertThatIllegalArgumentException().isThrownBy(() -> CurrencyAmountArray.of(values)); }
@Test public void coverage() { DoubleArray values = DoubleArray.of(1, 2, 3); CurrencyAmountArray test = CurrencyAmountArray.of(GBP, values); coverImmutableBean(test); DoubleArray values2 = DoubleArray.of(1, 2, 3); CurrencyAmountArray test2 = CurrencyAmountArray.of(USD, values2); coverBeanEquals(test, test2); }
@Test public void test_serialization() { CurrencyAmountArray test = CurrencyAmountArray.of(GBP, DoubleArray.of(1, 2, 3)); assertSerialization(test); }