### Question:
DiscountingSwapProductPricer { public DiscountingSwapLegPricer getLegPricer() { return legPricer; } DiscountingSwapProductPricer(
      DiscountingSwapLegPricer legPricer); DiscountingSwapLegPricer getLegPricer(); CurrencyAmount presentValue(ResolvedSwap swap, Currency currency, RatesProvider provider); MultiCurrencyAmount presentValue(ResolvedSwap swap, RatesProvider provider); MultiCurrencyAmount forecastValue(ResolvedSwap swap, RatesProvider provider); MultiCurrencyAmount accruedInterest(ResolvedSwap swap, RatesProvider provider); double parRate(ResolvedSwap swap, RatesProvider provider); double marketQuote(ResolvedSwap swap, RatesProvider provider); double parSpread(ResolvedSwap swap, RatesProvider provider); PointSensitivityBuilder presentValueSensitivity(ResolvedSwap swap, RatesProvider provider); PointSensitivityBuilder presentValueSensitivity(ResolvedSwap swap, Currency currency, RatesProvider provider); PointSensitivityBuilder forecastValueSensitivity(ResolvedSwap swap, RatesProvider provider); PointSensitivityBuilder parRateSensitivity(ResolvedSwap swap, RatesProvider provider); PointSensitivityBuilder marketQuoteSensitivity(ResolvedSwap swap, RatesProvider provider); PointSensitivityBuilder parSpreadSensitivity(ResolvedSwap swap, RatesProvider provider); CashFlows cashFlows(ResolvedSwap swap, RatesProvider provider); ExplainMap explainPresentValue(ResolvedSwap swap, RatesProvider provider); MultiCurrencyAmount currencyExposure(ResolvedSwap swap, RatesProvider provider); MultiCurrencyAmount currentCash(ResolvedSwap swap, RatesProvider provider); static final DiscountingSwapProductPricer DEFAULT; }### Answer:
@Test public void test_getters() { assertThat(DiscountingSwapProductPricer.DEFAULT.getLegPricer()).isEqualTo(DiscountingSwapLegPricer.DEFAULT); assertThat(DiscountingSwapTradePricer.DEFAULT.getProductPricer()).isEqualTo(DiscountingSwapProductPricer.DEFAULT); }
@Test @SuppressWarnings("unchecked") public void test_legPricer() { SwapPaymentPeriodPricer<SwapPaymentPeriod> mockPeriod = mock(SwapPaymentPeriodPricer.class); SwapPaymentEventPricer<SwapPaymentEvent> mockEvent = mock(SwapPaymentEventPricer.class); DiscountingSwapLegPricer pricerLeg = new DiscountingSwapLegPricer(mockPeriod, mockEvent); DiscountingSwapProductPricer pricerSwap = new DiscountingSwapProductPricer(pricerLeg); assertThat(pricerSwap.getLegPricer()).isEqualTo(pricerLeg); }