### Question:
FxSingle implements FxProduct, Resolvable<ResolvedFxSingle>, ImmutableBean, Serializable { public static FxSingle of(Payment payment1, Payment payment2) { return create(payment1, payment2, null); } private  FxSingle(
      Payment baseCurrencyPayment,
      Payment counterCurrencyPayment,
      BusinessDayAdjustment paymentDateAdjustment); static FxSingle of(Payment payment1, Payment payment2); static FxSingle of(Payment payment1, Payment payment2, BusinessDayAdjustment paymentDateAdjustment); static FxSingle of(CurrencyAmount amount1, CurrencyAmount amount2, LocalDate paymentDate); static FxSingle of(
      CurrencyAmount amount1,
      CurrencyAmount amount2,
      LocalDate paymentDate,
      BusinessDayAdjustment paymentDateAdjustment); static FxSingle of(CurrencyAmount amount, FxRate fxRate, LocalDate paymentDate); static FxSingle of(
      CurrencyAmount amount,
      FxRate fxRate,
      LocalDate paymentDate,
      BusinessDayAdjustment paymentDateAdjustment); @Override CurrencyPair getCurrencyPair(); CurrencyAmount getBaseCurrencyAmount(); CurrencyAmount getCounterCurrencyAmount(); CurrencyAmount getPayCurrencyAmount(); CurrencyAmount getReceiveCurrencyAmount(); LocalDate getPaymentDate(); @Override ResolvedFxSingle resolve(ReferenceData refData); static FxSingle.Meta meta(); @Override FxSingle.Meta metaBean(); Payment getBaseCurrencyPayment(); Payment getCounterCurrencyPayment(); Optional<BusinessDayAdjustment> getPaymentDateAdjustment(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static final SerDeserializer DESERIALIZER; }### Answer:
@Test public void test_of_positiveNegative() { assertThatIllegalArgumentException() .isThrownBy(() -> FxSingle.of(GBP_P1000, USD_P1600, DATE_2015_06_30)); assertThatIllegalArgumentException() .isThrownBy(() -> FxSingle.of(GBP_M1000, USD_M1600, DATE_2015_06_30)); assertThatIllegalArgumentException() .isThrownBy(() -> FxSingle.of(CurrencyAmount.zero(GBP), USD_M1600, DATE_2015_06_30)); assertThatIllegalArgumentException() .isThrownBy(() -> FxSingle.of(CurrencyAmount.zero(GBP), USD_P1600, DATE_2015_06_30)); }
@Test public void test_of_sameCurrency() { assertThatIllegalArgumentException() .isThrownBy(() -> FxSingle.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)); }