@SuppressWarnings("deprecation")
@Test
public void toDerivativeUKTDeprecated() {
final BondFixedSecurity bondConverted = BOND_SECURITY_DEFINITION_G.toDerivative(REFERENCE_DATE_1, CURVES_NAME);
AnnuityPaymentFixedDefinition nominalDefinition = (AnnuityPaymentFixedDefinition) BOND_SECURITY_DEFINITION_G.getNominal();
AnnuityCouponFixedDefinition couponDefinition = BOND_SECURITY_DEFINITION_G.getCoupons();
final ZonedDateTime spotDate1 = ScheduleCalculator.getAdjustedDate(REFERENCE_DATE_1, SETTLEMENT_DAYS_G, CALENDAR_G);
nominalDefinition = nominalDefinition.trimBefore(spotDate1);
couponDefinition = couponDefinition.trimBefore(spotDate1);
final AnnuityPaymentFixed nominal = nominalDefinition.toDerivative(REFERENCE_DATE_1, CURVES_NAME);
final AnnuityCouponFixed coupon = couponDefinition.toDerivative(REFERENCE_DATE_1, CURVES_NAME);
final double spotTime1 = ACT_ACT.getDayCountFraction(REFERENCE_DATE_1, spotDate1);
final double accruedInterest = DAY_COUNT_G.getAccruedInterest(couponDefinition.getNthPayment(0).getAccrualStartDate(), spotDate1, couponDefinition.getNthPayment(0)
.getAccrualEndDate(), RATE_G, COUPON_PER_YEAR_G)
* NOTIONAL_G;