### Question:
Swap implements Product, Resolvable<ResolvedSwap>, ImmutableBean, Serializable { public static Swap of(SwapLeg... legs) { ArgChecker.notEmpty(legs, "legs"); return new Swap(ImmutableList.copyOf(legs)); } private  Swap(
      List<? extends SwapLeg> legs); static Swap of(SwapLeg... legs); static Swap of(List<? extends SwapLeg> legs); ImmutableList<SwapLeg> getLegs(SwapLegType type); Optional<SwapLeg> getLeg(PayReceive payReceive); Optional<SwapLeg> getPayLeg(); Optional<SwapLeg> getReceiveLeg(); @DerivedProperty AdjustableDate getStartDate(); @DerivedProperty AdjustableDate getEndDate(); @Override ImmutableSet<Currency> allPaymentCurrencies(); @Override ImmutableSet<Currency> allCurrencies(); ImmutableSet<Index> allIndices(); String summaryDescription(); @Override ResolvedSwap resolve(ReferenceData refData); static Swap.Meta meta(); static Swap.Builder builder(); @Override Swap.Meta metaBean(); ImmutableList<SwapLeg> getLegs(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void test_isCrossCurrency() { assertThat(Swap.of(MOCK_GBP1, MOCK_USD1).isCrossCurrency()).isTrue(); assertThat(Swap.of(MOCK_GBP1, MOCK_GBP2, MOCK_USD1).isCrossCurrency()).isTrue(); assertThat(Swap.of(MOCK_GBP1, MOCK_GBP2).isCrossCurrency()).isFalse(); assertThat(Swap.of(MOCK_GBP1).isCrossCurrency()).isFalse(); }
@Test public void coverage() { Swap test = Swap.of(MOCK_GBP1, MOCK_USD1); coverImmutableBean(test); Swap test2 = Swap.of(MOCK_GBP1); coverBeanEquals(test, test2); }
@Test public void test_serialization() { Swap test = Swap.of(MOCK_GBP1, MOCK_USD1); assertSerialization(test); }