public virtual void test_of_twoLegs_xccy()
        {
            IborCapFloor test = IborCapFloor.of(CAPFLOOR_LEG, PAY_LEG_XCCY);

            assertEquals(test.CapFloorLeg, CAPFLOOR_LEG);
            assertEquals(test.PayLeg.get(), PAY_LEG_XCCY);
            assertEquals(test.CrossCurrency, true);
            assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(GBP, EUR));
            assertEquals(test.allCurrencies(), ImmutableSet.of(GBP, EUR));
            assertEquals(test.allIndices(), ImmutableSet.of(GBP_LIBOR_3M, EUR_EURIBOR_3M));
        }
        public virtual void test_of_oneLeg()
        {
            IborCapFloor test = IborCapFloor.of(CAPFLOOR_LEG);

            assertEquals(test.CapFloorLeg, CAPFLOOR_LEG);
            assertEquals(test.PayLeg.Present, false);
            assertEquals(test.CrossCurrency, false);
            assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(EUR));
            assertEquals(test.allCurrencies(), ImmutableSet.of(EUR));
            assertEquals(test.allIndices(), ImmutableSet.of(EUR_EURIBOR_3M));
        }