//-------------------------------------------------------------------------
        public virtual void test_parse_option()
        {
            EtdContractSpecId specId   = EtdContractSpecId.of("OG-ETD", "O-ECAG-OGBL");
            EtdContractSpec   contract = EtdContractSpec.builder().id(specId).type(EtdType.OPTION).exchangeId(ExchangeIds.ECAG).contractCode(OGBL).description("Dummy").priceInfo(SecurityPriceInfo.of(Currency.GBP, 100)).build();
            ReferenceData     refData  = ImmutableReferenceData.of(specId, contract);
            PositionCsvLoader test     = PositionCsvLoader.of(refData);
            ValueWithFailures <IList <EtdOptionPosition> > trades = test.parse(ImmutableList.of(FILE.CharSource), typeof(EtdOptionPosition));

            IList <EtdOptionPosition> filtered = trades.Value;

            assertEquals(filtered.Count, 3);

            EtdOptionPosition expected1 = EtdOptionPosition.builder().info(PositionInfo.builder().id(StandardId.of("OG", "123431")).build()).security(EtdOptionSecurity.of(contract, YearMonth.of(2017, 6), EtdVariant.ofMonthly(), 0, PutCall.PUT, 3d, YearMonth.of(2017, 9))).longQuantity(15d).shortQuantity(2d).build();

            assertBeanEquals(expected1, filtered[0]);

            EtdOptionPosition expected2 = EtdOptionPosition.builder().info(PositionInfo.builder().id(StandardId.of("OG", "123432")).build()).security(EtdOptionSecurity.of(contract, YearMonth.of(2017, 6), EtdVariant.ofFlexOption(13, EtdSettlementType.CASH, EtdOptionType.AMERICAN), 0, PutCall.CALL, 4d)).longQuantity(0d).shortQuantity(13d).build();

            assertBeanEquals(expected2, filtered[1]);

            EtdOptionPosition expected3 = EtdOptionPosition.builder().info(PositionInfo.builder().id(StandardId.of("OG", "123433")).build()).security(EtdOptionSecurity.of(contract, YearMonth.of(2017, 6), EtdVariant.ofWeekly(2), 0, PutCall.PUT, 5.1d)).longQuantity(0d).shortQuantity(20d).build();

            assertBeanEquals(expected3, filtered[2]);
        }