@Test
public void swap() throws JSONException {
ZonedDateTime tradeDate = zdt(2012, 12, 21, 11, 0, 0, 0, ZoneOffset.UTC);
ZonedDateTime effectiveDate = zdt(2013, 1, 21, 11, 0, 0, 0, ZoneOffset.UTC);
ZonedDateTime maturityDate = zdt(2013, 12, 21, 11, 0, 0, 0, ZoneOffset.UTC);
SwapLeg payLeg = new FixedInterestRateLeg(
DayCountFactory.INSTANCE.getDayCount("Act/360"),
SimpleFrequency.MONTHLY,
ExternalId.of(ExternalSchemes.FINANCIAL, "123"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"),
new InterestRateNotional(Currency.GBP, 123),
false,
0.01);
SwapLeg receiveLeg = new FloatingInterestRateLeg(
DayCountFactory.INSTANCE.getDayCount("Act/Act"),
SimpleFrequency.QUARTERLY,
ExternalId.of(ExternalSchemes.FINANCIAL, "123"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"),
new InterestRateNotional(Currency.GBP, 234),