/**
  * Returns AAPL equity security for testing
  *
  * @return the equity security
  */
 public static EquitySecurity getEquitySecurity() {
   EquitySecurity equitySecurity =
       new EquitySecurity("NASDAQ/NGS (GLOBAL SELECT MARKET)", "XNGS", "APPLE INC", Currency.USD);
   equitySecurity.addExternalId(ExternalSchemes.bloombergTickerSecurityId("AAPL US Equity"));
   equitySecurity.addExternalId(ExternalSchemes.bloombergBuidSecurityId("EQ0010169500001000"));
   equitySecurity.addExternalId(ExternalSchemes.cusipSecurityId("037833100"));
   equitySecurity.addExternalId(ExternalSchemes.isinSecurityId("US0378331005"));
   equitySecurity.addExternalId(ExternalSchemes.sedol1SecurityId("2046251"));
   equitySecurity.setShortName("AAPL");
   equitySecurity.setName("APPLE INC");
   equitySecurity.setGicsCode(GICSCode.of("45202010"));
   return equitySecurity;
 }
  /**
   * Get US bond future security for testing
   *
   * @return the bond future security
   */
  public static BondFutureSecurity getBondFutureSecurity() {
    Expiry expiry =
        new Expiry(
            ZonedDateTime.of(LocalDateTime.of(2010, Month.JUNE, 21, 19, 0), ZoneOffset.UTC),
            ExpiryAccuracy.MIN_HOUR_DAY_MONTH_YEAR);
    Set<BondFutureDeliverable> basket = new HashSet<BondFutureDeliverable>();
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810EV6")), 1.0858));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FB9")), 1.0132));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810PX0")), 0.7984));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FG8")), 0.9169));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810QD3")), 0.7771));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FF0")), 0.9174));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810PW2")), 0.7825));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FE3")), 0.9454));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810QH4")), 0.7757));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810PU6")), 0.8675));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810EX2")), 1.0765));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FT0")), 0.8054));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FJ2")), 1.0141));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810PT9")), 0.8352));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810QE1")), 0.8109));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FP8")), 0.9268));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810QA9")), 0.6606));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FM5")), 1.0286));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810EY0")), 1.0513));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810QB7")), 0.7616));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810QC5")), 0.795));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810EZ7")), 1.0649));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810EW4")), 1.0));
    basket.add(
        new BondFutureDeliverable(
            ExternalIdBundle.of(ExternalSchemes.bloombergBuidSecurityId("GV912810FA1")), 1.0396));

    BondFutureSecurity sec =
        new BondFutureSecurity(
            expiry,
            "XCBT",
            "XCBT",
            Currency.USD,
            1000,
            basket,
            LocalDate.of(2010, 6, 01).atStartOfDay(ZoneOffset.UTC),
            LocalDate.of(2010, 6, 01).atStartOfDay(ZoneOffset.UTC),
            "Bond");
    sec.setName("US LONG BOND(CBT) Jun10");
    Set<ExternalId> identifiers = new HashSet<ExternalId>();
    identifiers.add(ExternalSchemes.bloombergBuidSecurityId("IX8530684-0"));
    identifiers.add(ExternalSchemes.cusipSecurityId("USM10"));
    identifiers.add(ExternalSchemes.bloombergTickerSecurityId("USM10 Comdty"));
    sec.setExternalIdBundle(ExternalIdBundle.of(identifiers));
    return sec;
  }