### Question:
ResolvedFxSingle implements ResolvedProduct, ImmutableBean, Serializable { public static ResolvedFxSingle of(Payment payment1, Payment payment2) { CurrencyPair pair = CurrencyPair.of(payment2.getCurrency(), payment1.getCurrency()); if (pair.isConventional()) { return new ResolvedFxSingle(payment2, payment1); } else { return new ResolvedFxSingle(payment1, payment2); } } private  ResolvedFxSingle(
      Payment baseCurrencyPayment,
      Payment counterCurrencyPayment); static ResolvedFxSingle of(Payment payment1, Payment payment2); static ResolvedFxSingle of(CurrencyAmount amount1, CurrencyAmount amount2, LocalDate valueDate); static ResolvedFxSingle of(CurrencyAmount amountCurrency1, FxRate fxRate, LocalDate paymentDate); CurrencyPair getCurrencyPair(); CurrencyAmount getReceiveCurrencyAmount(); LocalDate getPaymentDate(); ResolvedFxSingle inverse(); static ResolvedFxSingle.Meta meta(); @Override ResolvedFxSingle.Meta metaBean(); Payment getBaseCurrencyPayment(); Payment getCounterCurrencyPayment(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_payments_sameCurrency() { assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSingle.of(PAYMENT_GBP_P1000, PAYMENT_GBP_M1000)); }
@Test public void test_of_amounts_positiveNegative() { assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSingle.of(GBP_P1000, USD_P1600, DATE_2015_06_30)); assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSingle.of(GBP_M1000, USD_M1600, DATE_2015_06_30)); assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSingle.of(CurrencyAmount.zero(GBP), USD_M1600, DATE_2015_06_30)); assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSingle.of(CurrencyAmount.zero(GBP), USD_P1600, DATE_2015_06_30)); }
@Test public void test_of_sameCurrency() { assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSingle.of(GBP_P1000, GBP_M1000, DATE_2015_06_30)); }
@Test public void test_of_rate_wrongCurrency() { assertThatIllegalArgumentException() .isThrownBy(() -> FxSingle.of(GBP_P1000, FxRate.of(USD, EUR, 1.45d), DATE_2015_06_30)); }