//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void test_black()
        public virtual void test_black()
        {
            double tol = 1.0e-2;

            for (int i = 0; i < 11; ++i)
            {
                // up barrier
                double lowerBarrier = 1.1 + 0.025 * i;
                SimpleConstantContinuousBarrier dko       = SimpleConstantContinuousBarrier.of(BarrierType.DOWN, KnockType.KNOCK_OUT, lowerBarrier);
                ResolvedFxSingleBarrierOption   optionDko = ResolvedFxSingleBarrierOption.of(CALL, dko);
                double priceDkoBlack = BLACK_PRICER.price(optionDko, RATE_PROVIDER_FLAT, VOLS_FLAT);
                double priceDko      = PRICER_70.price(optionDko, RATE_PROVIDER_FLAT, VOLS_FLAT, DATA_70_FLAT);
                assertEqualsRelative(priceDko, priceDkoBlack, tol);
                SimpleConstantContinuousBarrier dki       = SimpleConstantContinuousBarrier.of(BarrierType.DOWN, KnockType.KNOCK_IN, lowerBarrier);
                ResolvedFxSingleBarrierOption   optionDki = ResolvedFxSingleBarrierOption.of(CALL, dki);
                double priceDkiBlack = BLACK_PRICER.price(optionDki, RATE_PROVIDER_FLAT, VOLS_FLAT);
                double priceDki      = PRICER_70.price(optionDki, RATE_PROVIDER_FLAT, VOLS_FLAT, DATA_70_FLAT);
                assertEqualsRelative(priceDki, priceDkiBlack, tol);
                // down barrier
                double higherBarrier = 1.45 + 0.025 * i;
                SimpleConstantContinuousBarrier uko       = SimpleConstantContinuousBarrier.of(BarrierType.UP, KnockType.KNOCK_OUT, higherBarrier);
                ResolvedFxSingleBarrierOption   optionUko = ResolvedFxSingleBarrierOption.of(CALL, uko);
                double priceUkoBlack = BLACK_PRICER.price(optionUko, RATE_PROVIDER_FLAT, VOLS_FLAT);
                double priceUko      = PRICER_70.price(optionUko, RATE_PROVIDER_FLAT, VOLS_FLAT, DATA_70_FLAT);
                assertEqualsRelative(priceUko, priceUkoBlack, tol);
                SimpleConstantContinuousBarrier uki       = SimpleConstantContinuousBarrier.of(BarrierType.UP, KnockType.KNOCK_IN, higherBarrier);
                ResolvedFxSingleBarrierOption   optionUki = ResolvedFxSingleBarrierOption.of(CALL, uki);
                double priceUkiBlack = BLACK_PRICER.price(optionUki, RATE_PROVIDER_FLAT, VOLS_FLAT);
                double priceUki      = PRICER_70.price(optionUki, RATE_PROVIDER_FLAT, VOLS_FLAT, DATA_70_FLAT);
                assertEqualsRelative(priceUki, priceUkiBlack, tol);
            }
        }
        //-------------------------------------------------------------------------
        public virtual void test_withData()
        {
            ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer pricer = new ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer(5);
            RecombiningTrinomialTreeData data = pricer.Calibrator.calibrateTrinomialTree(CALL_DKO.UnderlyingOption, RATE_PROVIDER, VOLS);
            double price         = pricer.price(CALL_UKI_C, RATE_PROVIDER, VOLS);
            double priceWithData = pricer.price(CALL_UKI_C, RATE_PROVIDER, VOLS, data);

            assertEquals(price, priceWithData);
            CurrencyAmount pv         = pricer.presentValue(CALL_DKO, RATE_PROVIDER, VOLS);
            CurrencyAmount pvWithData = pricer.presentValue(CALL_DKO, RATE_PROVIDER, VOLS, data);

            assertEquals(pv, pvWithData);
            MultiCurrencyAmount ce         = pricer.currencyExposure(CALL_UKI_C, RATE_PROVIDER, VOLS);
            MultiCurrencyAmount ceWithData = pricer.currencyExposure(CALL_UKI_C, RATE_PROVIDER, VOLS, data);

            assertEquals(ce, ceWithData);
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void test_monotonicity()
        public virtual void test_monotonicity()
        {
            double priceDkoPrev = 100d;
            double priceDkiPrev = 0d;
            double priceUkoPrev = 0d;
            double priceUkiPrev = 100d;

            for (int i = 0; i < 50; ++i)
            {
                // up barrier
                double lowerBarrier = 1.1 + 0.006 * i;
                SimpleConstantContinuousBarrier dko       = SimpleConstantContinuousBarrier.of(BarrierType.DOWN, KnockType.KNOCK_OUT, lowerBarrier);
                ResolvedFxSingleBarrierOption   optionDko = ResolvedFxSingleBarrierOption.of(CALL, dko);
                double priceDko = PRICER_39.price(optionDko, RATE_PROVIDER, VOLS, DATA_39);
                SimpleConstantContinuousBarrier dki       = SimpleConstantContinuousBarrier.of(BarrierType.DOWN, KnockType.KNOCK_IN, lowerBarrier);
                ResolvedFxSingleBarrierOption   optionDki = ResolvedFxSingleBarrierOption.of(CALL, dki);
                double priceDki = PRICER_39.price(optionDki, RATE_PROVIDER, VOLS, DATA_39);
                // down barrier
                double higherBarrier = 1.4 + 0.006 * (i + 1);
                SimpleConstantContinuousBarrier uko       = SimpleConstantContinuousBarrier.of(BarrierType.UP, KnockType.KNOCK_OUT, higherBarrier);
                ResolvedFxSingleBarrierOption   optionUko = ResolvedFxSingleBarrierOption.of(CALL, uko);
                double priceUko = PRICER_39.price(optionUko, RATE_PROVIDER, VOLS, DATA_39);
                SimpleConstantContinuousBarrier uki       = SimpleConstantContinuousBarrier.of(BarrierType.UP, KnockType.KNOCK_IN, higherBarrier);
                ResolvedFxSingleBarrierOption   optionUki = ResolvedFxSingleBarrierOption.of(CALL, uki);
                double priceUki = PRICER_39.price(optionUki, RATE_PROVIDER, VOLS, DATA_39);
                assertTrue(priceDkoPrev > priceDko);
                assertTrue(priceDkiPrev < priceDki);
                assertTrue(priceUkoPrev < priceUko);
                assertTrue(priceUkiPrev > priceUki);
                priceDkoPrev = priceDko;
                priceDkiPrev = priceDki;
                priceUkoPrev = priceUko;
                priceUkiPrev = priceUki;
            }
        }