gt:             (byte) 41, (byte) 50};
context: /*
   *   Copyright (c) 2006-2016 Marvisan Pty. Ltd. All rights reserved.
   *               Use is subject to license terms.
   */
  
  /*
   * InstrumentLeg44TestData.java
   *
   * $Id: InstrumentLeg44TestData.java,v 1.2 2011-10-29 09:42:31 vrotaru Exp $
   */
  package net.hades.fix.message.comp.impl.v44;
  
  import java.io.UnsupportedEncodingException;
  import java.math.BigDecimal;
  import java.util.Calendar;
  
  import static org.junit.Assert.*;
  
  import net.hades.fix.message.MsgTest;
  import net.hades.fix.message.comp.InstrumentLeg;
  import net.hades.fix.message.type.Currency;
  import net.hades.fix.message.type.Product;
  import net.hades.fix.message.type.SecurityType;
  import net.hades.fix.message.type.Side;
  
  /**
   * Test utility for InstrumentLeg component class.
   *
   * @author <a href="mailto:support@marvisan.com">Support Team</a>
   * @version $Revision: 1.2 $
   * @created 28/02/2009, 4:45:14 PM
   */
  public class InstrumentLeg44TestData extends MsgTest {
  
      private static final InstrumentLeg44TestData INSTANCE;
  
      static {
          INSTANCE = new InstrumentLeg44TestData();
      }
  
      public static InstrumentLeg44TestData getInstance() {
          return INSTANCE;
      }
  
      public void populate1(quickfix.fix44.component.InstrumentLeg grpl) throws UnsupportedEncodingException {
          grpl.setString(quickfix.field.LegSymbol.FIELD, "JAVA");
          grpl.setString(quickfix.field.LegSymbolSfx.FIELD, "WI");
          grpl.setString(quickfix.field.LegSecurityID.FIELD, "JAVA");
          grpl.setString(quickfix.field.LegSecurityIDSource.FIELD, "2");
          grpl.setInt(quickfix.field.NoLegSecurityAltID.FIELD, 2);
          quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID grple1 = new quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID();
          grple1.setString(quickfix.field.LegSecurityAltID.FIELD, "Alt ID JAVA 1");
          grple1.setString(quickfix.field.LegSecurityAltIDSource.FIELD, "2");
          grpl.addGroup(grple1);
          quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID grple2 = new quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID();
          grple2.setString(quickfix.field.LegSecurityAltID.FIELD, "Alt ID JAVA 2");
          grple2.setString(quickfix.field.LegSecurityAltIDSource.FIELD, "3");
          grpl.addGroup(grple2);
          grpl.setInt(quickfix.field.LegProduct.FIELD, Product.EQUITY.getValue());
          grpl.setString(quickfix.field.LegCFICode.FIELD, "CFI MOT");
          grpl.setString(quickfix.field.LegSecurityType.FIELD, quickfix.field.SecurityType.OPTION);
          grpl.setString(quickfix.field.LegSecuritySubType.FIELD, "OOO");
          grpl.setString(quickfix.field.LegMaturityMonthYear.FIELD, "200806w2");
          Calendar calm = Calendar.getInstance();
          calm.set(2009, 9, 21, 23, 59, 59);
          calm.set(Calendar.MILLISECOND, 0);
          grpl.setUtcDateOnly(quickfix.field.LegMaturityDate.FIELD, calm.getTime());
          calm.add(Calendar.MONTH, 1);
          grpl.setUtcDateOnly(quickfix.field.LegCouponPaymentDate.FIELD, calm.getTime());
          calm.add(Calendar.YEAR, -1);
          grpl.setUtcDateOnly(quickfix.field.LegIssueDate.FIELD, calm.getTime());
          grpl.setInt(quickfix.field.LegRepoCollateralSecurityType.FIELD, 16);
          grpl.setInt(quickfix.field.LegRepurchaseTerm.FIELD, 5);
          grpl.setDecimal(quickfix.field.LegRepurchaseRate.FIELD, new BigDecimal("15.5"));
          grpl.setDecimal(quickfix.field.LegFactor.FIELD, new BigDecimal("1.2367"));
          grpl.setString(quickfix.field.LegCreditRating.FIELD, "AAA");
          grpl.setString(quickfix.field.LegInstrRegistry.FIELD, "ISO");
          grpl.setString(quickfix.field.LegCountryOfIssue.FIELD, "US");
          grpl.setString(quickfix.field.LegStateOrProvinceOfIssue.FIELD, "New York");
          grpl.setString(quickfix.field.LegLocaleOfIssue.FIELD, "US");
          Calendar calr = Calendar.getInstance();
          calr.set(2009, 1, 16, 23, 59, 59);
          calr.set(Calendar.MILLISECOND, 0);
          grpl.setUtcDateOnly(quickfix.field.LegRedemptionDate.FIELD, calr.getTime());
          grpl.setDecimal(quickfix.field.LegStrikePrice.FIELD, new BigDecimal("25.48"));
          grpl.setString(quickfix.field.LegStrikeCurrency.FIELD, "USD");
          grpl.setChar(quickfix.field.LegOptAttribute.FIELD, 'C');
          grpl.setDecimal(quickfix.field.LegContractMultiplier.FIELD, new BigDecimal("1.023"));
          grpl.setDecimal(quickfix.field.LegCouponRate.FIELD, new BigDecimal("1.077"));
          grpl.setString(quickfix.field.LegSecurityExchange.FIELD, "NYSE");
          grpl.setString(quickfix.field.LegIssuer.FIELD, "NYSE PL");
          byte[] issuerDataExp = new byte[] {(byte) 18, (byte) 33, (byte) 44, (byte) 96,
              (byte) 177, (byte) 199, (byte) 224, (byte) 253};
          grpl.setInt(quickfix.field.EncodedLegIssuerLen.FIELD, 8);
          grpl.setString(quickfix.field.EncodedLegIssuer.FIELD, new String(issuerDataExp, DEFAULT_CHARACTER_SET));
          grpl.setString(quickfix.field.LegSecurityDesc.FIELD, "Motorola shares");
          byte[] encSecExp = new byte[] {(byte) 19, (byte) 34, (byte) 45, (byte) 97,
              (byte) 178, (byte) 200, (byte) 225, (byte) 254};
          grpl.setInt(quickfix.field.EncodedLegSecurityDescLen.FIELD, 8);
          grpl.setString(quickfix.field.EncodedLegSecurityDesc.FIELD, new String(encSecExp, DEFAULT_CHARACTER_SET));
          grpl.setDouble(quickfix.field.LegRatioQty.FIELD, 2.35);
          grpl.setChar(quickfix.field.LegSide.FIELD, 'A');
          grpl.setString(quickfix.field.LegCurrency.FIELD, "USD");
          grpl.setString(quickfix.field.LegPool.FIELD, "pool_1");
          grpl.setString(quickfix.field.LegDatedDate.FIELD, "20100908");
          grpl.setString(quickfix.field.LegContractSettlMonth.FIELD, "20093w");
          grpl.setString(quickfix.field.LegInterestAccrualDate.FIELD, "20100319");
      }
  
      public void populate2(quickfix.fix44.component.InstrumentLeg grpl) throws UnsupportedEncodingException {
          grpl.setString(quickfix.field.LegSymbol.FIELD, "IBM");
          grpl.setString(quickfix.field.LegSymbolSfx.FIELD, "CD");
          grpl.setString(quickfix.field.LegSecurityID.FIELD, "IBM");
          grpl.setString(quickfix.field.LegSecurityIDSource.FIELD, "3");
          grpl.setInt(quickfix.field.NoLegSecurityAltID.FIELD, 2);
          quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID grple1 = new quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID();
          grple1.setString(quickfix.field.LegSecurityAltID.FIELD, "Alt ID IBM 1");
          grple1.setString(quickfix.field.LegSecurityAltIDSource.FIELD, "2");
          grpl.addGroup(grple1);
          quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID grple2 = new quickfix.fix44.component.InstrumentLeg.NoLegSecurityAltID();
          grple2.setString(quickfix.field.LegSecurityAltID.FIELD, "Alt ID IBM 2");
          grple2.setString(quickfix.field.LegSecurityAltIDSource.FIELD, "4");
          grpl.addGroup(grple2);
          grpl.setInt(quickfix.field.LegProduct.FIELD, Product.EQUITY.getValue());
          grpl.setString(quickfix.field.LegCFICode.FIELD, "CFI IBM");
          grpl.setString(quickfix.field.LegSecurityType.FIELD, quickfix.field.SecurityType.FEDERAL_AGENCY_COUPON);
          grpl.setString(quickfix.field.LegSecuritySubType.FIELD, "ZZZ");
          grpl.setString(quickfix.field.LegMaturityMonthYear.FIELD, "200906w2");
          Calendar calm = Calendar.getInstance();
          calm.set(2009, 10, 1);
          grpl.setUtcDateOnly(quickfix.field.LegMaturityDate.FIELD, calm.getTime());
          calm.add(Calendar.MONTH, 1);
          grpl.setUtcDateOnly(quickfix.field.LegCouponPaymentDate.FIELD, calm.getTime());
          calm.add(Calendar.YEAR, -1);
          grpl.setUtcDateOnly(quickfix.field.LegIssueDate.FIELD, calm.getTime());
          grpl.setInt(quickfix.field.LegRepoCollateralSecurityType.FIELD, 16);
          grpl.setInt(quickfix.field.LegRepurchaseTerm.FIELD, 5);
          grpl.setDecimal(quickfix.field.LegRepurchaseRate.FIELD, new BigDecimal("15.51"));
          grpl.setDecimal(quickfix.field.LegFactor.FIELD, new BigDecimal("1.2361"));
          grpl.setString(quickfix.field.LegCreditRating.FIELD, "R");
          grpl.setString(quickfix.field.LegInstrRegistry.FIELD, "BIC");
          grpl.setString(quickfix.field.LegCountryOfIssue.FIELD, "US");
          grpl.setString(quickfix.field.LegStateOrProvinceOfIssue.FIELD, "New York");
          grpl.setString(quickfix.field.LegLocaleOfIssue.FIELD, "US");
          Calendar calr = Calendar.getInstance();
          calr.set(2009, 1, 18);
          grpl.setUtcDateOnly(quickfix.field.LegRedemptionDate.FIELD, calr.getTime());
          grpl.setDecimal(quickfix.field.LegStrikePrice.FIELD, new BigDecimal("25.481"));
          grpl.setString(quickfix.field.LegStrikeCurrency.FIELD, "USD");
          grpl.setChar(quickfix.field.LegOptAttribute.FIELD, 'C');
          grpl.setDecimal(quickfix.field.LegContractMultiplier.FIELD, new BigDecimal("1.0231"));
          grpl.setDecimal(quickfix.field.LegCouponRate.FIELD, new BigDecimal("1.0771"));
          grpl.setString(quickfix.field.LegSecurityExchange.FIELD, "LSE");
          grpl.setString(quickfix.field.LegIssuer.FIELD, "LSE PL");
          byte[] issuerDataExp = new byte[] {(byte) 18, (byte) 33, (byte) 44, (byte) 96,
              (byte) 177, (byte) 199, (byte) 224, (byte) 253};
          grpl.setInt(quickfix.field.EncodedLegIssuerLen.FIELD, 8);
          grpl.setString(quickfix.field.EncodedLegIssuer.FIELD, new String(issuerDataExp, DEFAULT_CHARACTER_SET));
          grpl.setString(quickfix.field.LegSecurityDesc.FIELD, "IBM shares");
          byte[] encSecExp = new byte[] {(byte) 19, (byte) 34, (byte) 45, (byte) 97,
              (byte) 178, (byte) 200, (byte) 225, (byte) 254};
          grpl.setInt(quickfix.field.EncodedLegSecurityDescLen.FIELD, 8);
          grpl.setString(quickfix.field.EncodedLegSecurityDesc.FIELD, new String(encSecExp, DEFAULT_CHARACTER_SET));
          grpl.setDouble(quickfix.field.LegRatioQty.FIELD, 2.351);
          grpl.setChar(quickfix.field.LegSide.FIELD, '3');
          grpl.setString(quickfix.field.LegCurrency.FIELD, "USD");
          grpl.setString(quickfix.field.LegPool.FIELD, "pool_2");
          grpl.setString(quickfix.field.LegDatedDate.FIELD, "20101008");
          grpl.setString(quickfix.field.LegContractSettlMonth.FIELD, "3w");
          grpl.setString(quickfix.field.LegInterestAccrualDate.FIELD, "20101019");
      }
  
      public void populate1(InstrumentLeg instrumentLeg) {
          instrumentLeg.setLegSymbol("MOT");
          instrumentLeg.setLegSymbolSfx("WI");
          instrumentLeg.setLegSecurityID("SEC_ID");
          instrumentLeg.setLegSecurityIDSource("4");
          instrumentLeg.setNoLegSecurityAltID(new Integer(2));
          instrumentLeg.getLegSecurityAltIDGroups()[0].setLegSecurityAltID("SEC_ALT_ID_1");
          instrumentLeg.getLegSecurityAltIDGroups()[0].setLegSecurityAltIDSource("2");
          instrumentLeg.getLegSecurityAltIDGroups()[1].setLegSecurityAltID("SEC_ALT_ID_2");
          instrumentLeg.getLegSecurityAltIDGroups()[1].setLegSecurityAltIDSource("3");
          instrumentLeg.setLegProduct(Product.EQUITY);
          instrumentLeg.setLegCFICode("cfi_code");
          instrumentLeg.setLegSecurityType(SecurityType.Option.getValue());
          instrumentLeg.setLegSecuritySubType("sec_sub_234");
          instrumentLeg.setLegMaturityMonthYear("092009");
          Calendar calmd = Calendar.getInstance();
          calmd.set(Calendar.DAY_OF_MONTH, 3);
          calmd.set(Calendar.MONTH, 2);
          calmd.set(Calendar.YEAR, 2008);
          calmd.set(Calendar.HOUR_OF_DAY, 12);
          calmd.set(Calendar.MINUTE, 23);
          calmd.set(Calendar.SECOND, 55);
          calmd.set(Calendar.MILLISECOND, 0);
          instrumentLeg.setLegMaturityDate(calmd.getTime());
          Calendar calpd = Calendar.getInstance();
          calpd.set(Calendar.DAY_OF_MONTH, 7);
          calpd.set(Calendar.MONTH, 7);
          calpd.set(Calendar.YEAR, 2009);
          instrumentLeg.setLegCouponPaymentDate(calpd.getTime());
          Calendar calid = Calendar.getInstance();
          calid.set(Calendar.DAY_OF_MONTH, 6);
          calid.set(Calendar.MONTH, 6);
          calid.set(Calendar.YEAR, 2009);
          instrumentLeg.setLegIssueDate(calid.getTime());
          instrumentLeg.setLegRepoCollateralSecurityType("FAC");
          instrumentLeg.setLegRepurchaseTerm(new Integer(12));
          instrumentLeg.setLegRepurchaseRate(new Double("12.25"));
          instrumentLeg.setLegFactor(new Double("2.34"));
          instrumentLeg.setLegCreditRating("AAA");
          instrumentLeg.setLegInstrRegistry("ISO");
          instrumentLeg.setLegCountryOfIssue("AU");
          instrumentLeg.setLegStateOrProvinceOfIssue("NSW");
          instrumentLeg.setLegLocaleOfIssue("AU");
          Calendar calrd = Calendar.getInstance();
          calrd.set(Calendar.DAY_OF_MONTH, 5);
          calrd.set(Calendar.MONTH, 3);
          calrd.set(Calendar.YEAR, 2009);
          instrumentLeg.setLegRedemptionDate(calrd.getTime());
          instrumentLeg.setLegStrikePrice(new Double(2.55));
          instrumentLeg.setLegStrikeCurrency(Currency.UnitedStatesDollar);
          instrumentLeg.setLegOptAttribute(new Character('S'));
          instrumentLeg.setLegContractMultiplier(new Double("1.12"));
          instrumentLeg.setLegCouponRate(new Double("2.56"));
          instrumentLeg.setLegSecurityExchange("NYSE");
          instrumentLeg.setLegIssuer("IB");
          instrumentLeg.setEncodedLegIssuerLen(new Integer(7));
          byte[] encLegIssuer = new byte[] {(byte) 19, (byte) 34, (byte) 45, (byte) 97,
              (byte) 178, (byte) 200, (byte) 225};
          instrumentLeg.setEncodedLegIssuer(encLegIssuer);
          instrumentLeg.setLegSecurityDesc("MOT shares");
          instrumentLeg.setEncodedLegSecurityDescLen(new Integer(6));
          byte[] encLegSecDesc = new byte[] {(byte) 25, (byte) 30, (byte) 35, (byte) 40,
  