### Question:
ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer { public CurrencyAmount presentValue( ResolvedFxSingleBarrierOption option, RatesProvider ratesProvider, BlackFxOptionVolatilities volatilities) { RecombiningTrinomialTreeData treeData = calibrator.calibrateTrinomialTree(option.getUnderlyingOption(), ratesProvider, volatilities); return presentValue(option, ratesProvider, volatilities, treeData); } ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer();  ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer(int nSteps); ImpliedTrinomialTreeFxOptionCalibrator getCalibrator(); double price(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities); double price(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities,
      RecombiningTrinomialTreeData treeData); CurrencyAmount presentValue(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities); CurrencyAmount presentValue(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities,
      RecombiningTrinomialTreeData treeData); CurrencyParameterSensitivities presentValueSensitivityRates(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities); CurrencyParameterSensitivities presentValueSensitivityRates(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities,
      RecombiningTrinomialTreeData baseTreeData); MultiCurrencyAmount currencyExposure(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities); MultiCurrencyAmount currencyExposure(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities,
      RecombiningTrinomialTreeData treeData); static final ImpliedTrinomialTreeFxSingleBarrierOptionProductPricer DEFAULT; }### Answer:
@Test public void test_tradePricer() { for (int i = 0; i < 11; ++i) { double lowerBarrier = 1.1 + 0.025 * i; SimpleConstantContinuousBarrier dko = SimpleConstantContinuousBarrier.of(BarrierType.DOWN, KnockType.KNOCK_OUT, lowerBarrier); ResolvedFxSingleBarrierOption callDko = ResolvedFxSingleBarrierOption.of(CALL, dko); ResolvedFxSingleBarrierOptionTrade callTrade = ResolvedFxSingleBarrierOptionTrade.builder() .product(callDko) .premium(Payment.of(EUR, 0, VAL_DATE)) .build(); CurrencyAmount pvProduct = PRICER_39.presentValue(callDko, RATE_PROVIDER, VOLS); MultiCurrencyAmount pvTrade = TRADE_PRICER_39.presentValue(callTrade, RATE_PROVIDER, VOLS); assertThat(pvTrade.getAmount(USD)).isEqualTo(pvProduct); } }