//-------------------------------------------------------------------------
        public virtual void test_of_arrayAmounts()
        {
            LegAmounts test = LegAmounts.of(LEG_AMOUNT_1, LEG_AMOUNT_2);

            assertEquals(test.Amounts.size(), 2);
            assertEquals(test.Amounts.get(0), LEG_AMOUNT_1);
            assertEquals(test.Amounts.get(1), LEG_AMOUNT_2);
        }
        public virtual void test_of_list()
        {
            IList <LegAmount> list = ImmutableList.of(LEG_AMOUNT_1, LEG_AMOUNT_2);
            LegAmounts        test = LegAmounts.of(list);

            assertEquals(test.Amounts.size(), 2);
            assertEquals(test.Amounts.get(0), LEG_AMOUNT_1);
            assertEquals(test.Amounts.get(1), LEG_AMOUNT_2);
        }
        //-------------------------------------------------------------------------
        public virtual void convertedTo()
        {
            LegAmounts @base = LegAmounts.of(LEG_AMOUNT_1, LEG_AMOUNT_2);
            LegAmounts test  = @base.convertedTo(Currency.GBP, FxRate.of(Currency.USD, Currency.GBP, 0.7));

            assertThat(test.Amounts.get(0).Amount.Currency).isEqualTo(Currency.GBP);
            assertThat(test.Amounts.get(0).Amount.Amount).isEqualTo(500d * 0.7d);
            assertThat(test.Amounts.get(1).Amount.Currency).isEqualTo(Currency.GBP);
            assertThat(test.Amounts.get(1).Amount.Amount).isEqualTo(420d * 0.7d);
        }
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            LegAmounts test1 = LegAmounts.of(LEG_AMOUNT_1, LEG_AMOUNT_2);

            coverImmutableBean(test1);

            LegAmount  swapLeg = SwapLegAmount.builder().amount(CurrencyAmount.of(Currency.GBP, 1557.445)).payReceive(PayReceive.PAY).type(SwapLegType.FIXED).currency(Currency.EUR).build();
            LegAmounts test2   = LegAmounts.of(swapLeg);

            coverBeanEquals(test1, test2);
        }
        public virtual void test_serialization()
        {
            LegAmounts test = LegAmounts.of(LEG_AMOUNT_1, LEG_AMOUNT_2);

            assertSerialization(test);
        }