### Question:
CurrencyAmount implements FxConvertible<CurrencyAmount>, Comparable<CurrencyAmount>, Serializable { public static CurrencyAmount of(Currency currency, double amount) { return new CurrencyAmount(currency, amount); } private  CurrencyAmount(Currency currency, double amount); static CurrencyAmount zero(Currency currency); static CurrencyAmount of(Currency currency, double amount); static CurrencyAmount of(String currencyCode, double amount); @FromString static CurrencyAmount parse(String amountStr); Currency getCurrency(); double getAmount(); CurrencyAmount plus(CurrencyAmount amountToAdd); CurrencyAmount plus(double amountToAdd); CurrencyAmount minus(CurrencyAmount amountToSubtract); CurrencyAmount minus(double amountToSubtract); CurrencyAmount multipliedBy(double valueToMultiplyBy); CurrencyAmount mapAmount(DoubleUnaryOperator mapper); boolean isZero(); boolean isPositive(); boolean isNegative(); CurrencyAmount negated(); CurrencyAmount positive(); CurrencyAmount negative(); Money toMoney(); CurrencyAmount convertedTo(Currency resultCurrency, double fxRate); @Override CurrencyAmount convertedTo(Currency resultCurrency, FxRateProvider rateProvider); @Override int compareTo(CurrencyAmount other); @Override boolean equals(Object obj); @Override int hashCode(); @Override @ToString String toString();  }### Answer:
@Test public void test_of_Currency_NaN() { assertThatIllegalArgumentException().isThrownBy(() -> CurrencyAmount.of(Currency.USD, Double.NaN)); }
@Test public void test_of_Currency_nullCurrency() { assertThatIllegalArgumentException().isThrownBy(() -> CurrencyAmount.of((Currency) null, AMT1)); }
@Test public void test_of_String_nullCurrency() { assertThatIllegalArgumentException().isThrownBy(() -> CurrencyAmount.of((String) null, AMT1)); }