### Question:
ResolvedFxSwap implements ResolvedProduct, ImmutableBean, Serializable { public static ResolvedFxSwap of(ResolvedFxSingle nearLeg, ResolvedFxSingle farLeg) { return new ResolvedFxSwap(nearLeg, farLeg); } private  ResolvedFxSwap(
      ResolvedFxSingle nearLeg,
      ResolvedFxSingle farLeg); static ResolvedFxSwap of(ResolvedFxSingle nearLeg, ResolvedFxSingle farLeg); static ResolvedFxSwap ofForwardPoints(
      CurrencyAmount amountCurrency1,
      Currency currency2,
      double nearFxRate,
      double forwardPoints,
      LocalDate nearDate,
      LocalDate farDate); static ResolvedFxSwap.Meta meta(); @Override ResolvedFxSwap.Meta metaBean(); ResolvedFxSingle getNearLeg(); ResolvedFxSingle getFarLeg(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_of_wrongOrder() { assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSwap.of(FAR_LEG, NEAR_LEG)); }
@Test public void test_of_wrongBaseCurrency() { ResolvedFxSingle nearLeg = ResolvedFxSingle.of(EUR_P1590, USD_M1600, DATE_2011_11_21); assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSwap.of(nearLeg, FAR_LEG)); }
@Test public void test_of_wrongCounterCurrency() { ResolvedFxSingle nearLeg = ResolvedFxSingle.of(USD_P1550, EUR_P1590.negated(), DATE_2011_11_21); ResolvedFxSingle farLeg = ResolvedFxSingle.of(GBP_M1000, EUR_P1590, DATE_2011_12_21); assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSwap.of(nearLeg, farLeg)); }
@Test public void test_of_sameSign() { ResolvedFxSingle farLeg = ResolvedFxSingle.of(GBP_M1000.negated(), USD_P1550.negated(), DATE_2011_12_21); assertThatIllegalArgumentException() .isThrownBy(() -> ResolvedFxSwap.of(NEAR_LEG, farLeg)); }