### Question:
FxSwapTemplate implements TradeTemplate, ImmutableBean, Serializable { public static FxSwapTemplate of(Period periodToFar, FxSwapConvention convention) { return FxSwapTemplate.builder() .periodToNear(Period.ZERO) .periodToFar(periodToFar) .convention(convention).build(); } private  FxSwapTemplate(
      Period periodToNear,
      Period periodToFar,
      FxSwapConvention convention); static FxSwapTemplate of(Period periodToFar, FxSwapConvention convention); static FxSwapTemplate of(Period periodToNear, Period periodToFar, FxSwapConvention convention); CurrencyPair getCurrencyPair(); FxSwapTrade createTrade(
      LocalDate tradeDate,
      BuySell buySell,
      double notional,
      double nearFxRate,
      double forwardPoints,
      ReferenceData refData); static FxSwapTemplate.Meta meta(); static FxSwapTemplate.Builder builder(); @Override FxSwapTemplate.Meta metaBean(); Period getPeriodToNear(); Period getPeriodToFar(); FxSwapConvention getConvention(); Builder toBuilder(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void coverage() { FxSwapTemplate test = FxSwapTemplate.of(NEAR_PERIOD, FAR_PERIOD, CONVENTION); coverImmutableBean(test); FxSwapTemplate test2 = FxSwapTemplate.of(Period.ofMonths(4), Period.ofMonths(7), CONVENTION2); coverBeanEquals(test, test2); }
@Test public void test_serialization() { FxSwapTemplate test = FxSwapTemplate.of(NEAR_PERIOD, FAR_PERIOD, CONVENTION); assertSerialization(test); }