DayCount dayCount = DayCountFactory.INSTANCE.getDayCount("Actual/365");
final CashSecurity cash = new CashSecurity(Currency.USD, ExternalSchemes.financialRegionId("US"), start, maturity, dayCount, 0.05, 1);
cash.setUniqueId(UniqueId.of("TEST", "TEST"));
cash.setName("1m deposit rate");
cash.setExternalIdBundle(bundle);
FixedIncomeStripWithSecurity strip = new FixedIncomeStripWithSecurity(new FixedIncomeStrip(StripInstrumentType.CASH, Tenor.ONE_MONTH, "DEFAULT"), Tenor.ONE_MONTH, maturity, dummyId, cash);
assertEquals(strip, cycleObject(FixedIncomeStripWithSecurity.class, strip));
dummyId = ExternalSchemes.bloombergTickerSecurityId("EDZ2 Comdty");
bundle = ExternalIdBundle.of(dummyId);
final FutureSecurity future = new InterestRateFutureSecurity(new Expiry(ZonedDateTime.now()), "XCSE", "XCSE", Currency.USD, 0, dummyId, "Interest Rate");
future.setExternalIdBundle(bundle);
strip = new FixedIncomeStripWithSecurity(new FixedIncomeStrip(StripInstrumentType.FUTURE, Tenor.THREE_MONTHS, 2, "DEFAULT"), Tenor.THREE_MONTHS, DateUtils.getUTCDate(2011, 12, 1), dummyId, future);
assertEquals(strip, cycleObject(FixedIncomeStripWithSecurity.class, strip));
dummyId = ExternalSchemes.bloombergTickerSecurityId("USFR0BE Curncy");
bundle = ExternalIdBundle.of(dummyId);
ZonedDateTime startDate = DateUtils.getUTCDate(2011, 11, 1);
ZonedDateTime endDate = DateUtils.getUTCDate(2012, 2, 1);
ExternalId underlyingIdentifier = ExternalSchemes.bloombergTickerSecurityId("US0003M Index");
ZonedDateTime fixingDate = startDate.minusDays(2);
FRASecurity fra = new FRASecurity(Currency.USD, ExternalSchemes.financialRegionId("US"), startDate, endDate, 0.05, 1, underlyingIdentifier, fixingDate);
fra.setExternalIdBundle(bundle);
strip = new FixedIncomeStripWithSecurity(new FixedIncomeStrip(StripInstrumentType.FRA_3M, Tenor.FIVE_MONTHS, "DEFAULT"), Tenor.FIVE_MONTHS, endDate, dummyId, fra);
assertEquals(strip, cycleObject(FixedIncomeStripWithSecurity.class, strip));
}