public virtual void test_builder_inverse()
        {
            CurrencyAmount currencyNotional = CurrencyAmount.of(USD, NOTIONAL);
            ResolvedFxNdf  test             = ResolvedFxNdf.builder().agreedFxRate(FX_RATE).observation(FxIndexObservation.of(GBP_USD_WM, FIXING_DATE, REF_DATA)).paymentDate(PAYMENT_DATE).settlementCurrencyNotional(currencyNotional).build();

            assertEquals(test.AgreedFxRate, FX_RATE);
            assertEquals(test.Index, GBP_USD_WM);
            assertEquals(test.NonDeliverableCurrency, GBP);
            assertEquals(test.PaymentDate, PAYMENT_DATE);
            assertEquals(test.SettlementCurrency, USD);
            assertEquals(test.SettlementCurrencyNotional, currencyNotional);
            assertEquals(test.SettlementNotional, NOTIONAL);
        }
        public virtual void test_builder_wrongRate()
        {
            FxRate fxRate = FxRate.of(GBP, EUR, 1.1d);

            assertThrowsIllegalArg(() => ResolvedFxNdf.builder().agreedFxRate(fxRate).observation(FxIndexObservation.of(GBP_USD_WM, FIXING_DATE, REF_DATA)).paymentDate(PAYMENT_DATE).settlementCurrencyNotional(CURRENCY_NOTIONAL).build());
        }
        public virtual void test_builder_wrongCurrency()
        {
            CurrencyAmount currencyNotional = CurrencyAmount.of(EUR, NOTIONAL);

            assertThrowsIllegalArg(() => ResolvedFxNdf.builder().agreedFxRate(FX_RATE).observation(FxIndexObservation.of(GBP_USD_WM, FIXING_DATE, REF_DATA)).paymentDate(PAYMENT_DATE).settlementCurrencyNotional(currencyNotional).build());
        }
        internal static ResolvedFxNdf sut2()
        {
            FxRate fxRate = FxRate.of(GBP, EUR, 1.1d);

            return(ResolvedFxNdf.builder().agreedFxRate(fxRate).observation(FxIndexObservation.of(EUR_GBP_ECB, FIXING_DATE, REF_DATA)).paymentDate(PAYMENT_DATE).settlementCurrencyNotional(CURRENCY_NOTIONAL).build());
        }
 //-------------------------------------------------------------------------
 internal static ResolvedFxNdf sut()
 {
     return(ResolvedFxNdf.builder().agreedFxRate(FX_RATE).observation(FxIndexObservation.of(GBP_USD_WM, FIXING_DATE, REF_DATA)).paymentDate(PAYMENT_DATE).settlementCurrencyNotional(CURRENCY_NOTIONAL).build());
 }